From: <mad...@us...> - 2008-02-22 19:06:31
|
Revision: 2809 http://selinux.svn.sourceforge.net/selinux/?rev=2809&view=rev Author: madmethod Date: 2008-02-22 11:06:24 -0800 (Fri, 22 Feb 2008) Log Message: ----------- On Fri, 2008-02-22 at 11:55 -0500, Joshua Brindle wrote: > > Eric Paris wrote: >> > > I added "allow-unknown = deny" in semanage.conf and ran semodule -R >> > > >> > > [root@dhcp231-146 ~]# semodule -R >> > > error parsing semanage configuration file: syntax error >> > > semodule: Could not create semanage handle >> > > semodule: handle.c:123: semanage_is_connected: Assertion `sh != ((void *)0)' failed. >> > > Segmentation fault >> > > >> > > It was supposed to bail (allow-unknown is not a valid entry, it should >> > > be handle-unknown) but it wasn't supposed to segfault. Maybe someone >> > > who knows this code can find/fix it really quickly, if not I'm sure I'll >> > > get to look at it when it gets to the top of my list in 10 or 12 >> > > months :) >> > > >> > > policycoreutils-2.0.43-2.fc9.x86_64 >> > > > > > > This is totally untested but should fix it: Whitespace damaged, but applied with -l and it fixed the problem. Acked-by: Stephen Smalley <sd...@ty...> Merge at will. > > > > Index: trunk/policycoreutils/semodule/semodule.c > > =================================================================== > > --- trunk/policycoreutils/semodule/semodule.c (revision 2808) > > +++ trunk/policycoreutils/semodule/semodule.c (working copy) > > @@ -285,7 +285,7 @@ > > if (!sh) { > > fprintf(stderr, "%s: Could not create semanage handle\n", > > argv[0]); > > - goto cleanup; > > + goto cleanup_nohandle; > > } > > > > if (store) { > > @@ -473,6 +473,8 @@ > > } > > } > > semanage_handle_destroy(sh); > > + > > + cleanup_nohandle: > > cleanup(); > > exit(status); > > } > > > > > > Revision Links: -------------- http://selinux.svn.sourceforge.net/selinux/?rev=2808&view=rev Modified Paths: -------------- trunk/policycoreutils/semodule/semodule.c Modified: trunk/policycoreutils/semodule/semodule.c =================================================================== --- trunk/policycoreutils/semodule/semodule.c 2008-02-21 16:12:21 UTC (rev 2808) +++ trunk/policycoreutils/semodule/semodule.c 2008-02-22 19:06:24 UTC (rev 2809) @@ -285,7 +285,7 @@ if (!sh) { fprintf(stderr, "%s: Could not create semanage handle\n", argv[0]); - goto cleanup; + goto cleanup_nohandle; } if (store) { @@ -473,6 +473,8 @@ } } semanage_handle_destroy(sh); + + cleanup_nohandle: cleanup(); exit(status); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |