From: Joshua Brindle <method@manicmethod.com>
To: Eric Paris <eparis@redhat.com>
Cc: selinux <selinux@tycho.nsa.gov>
Subject: Re: segfault in semodule
Date: Fri, 22 Feb 2008 11:55:37 -0500 [thread overview]
Message-ID: <47BEFE89.4080201@manicmethod.com> (raw)
In-Reply-To: <1203696668.2914.25.camel@localhost.localdomain>
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:
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);
}
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
next prev parent reply other threads:[~2008-02-22 16:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-22 16:11 segfault in semodule Eric Paris
2008-02-22 16:55 ` Joshua Brindle [this message]
2008-02-22 17:22 ` Stephen Smalley
2008-02-22 17:41 ` Stephen Smalley
2008-02-22 17:56 ` Joshua Brindle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47BEFE89.4080201@manicmethod.com \
--to=method@manicmethod.com \
--cc=eparis@redhat.com \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.