From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: SELinux Mail List <selinux@tycho.nsa.gov>
Subject: [PATCH] check for handle creation failures in seobject
Date: Fri, 05 Jan 2007 11:27:12 -0500 [thread overview]
Message-ID: <459E7C60.8070308@mentalrootkit.com> (raw)
seobject.py assumes that handle creation always succeeds, though this is
not always the case. This patch checks for that failure.
Signed-off-by: Karl MacMillan <kmacmillan@mentalrootkit.com>
diff -r 4400130009b8 policycoreutils/semanage/seobject.py
--- a/policycoreutils/semanage/seobject.py Fri Jan 05 11:19:01 2007 -0500
+++ b/policycoreutils/semanage/seobject.py Fri Jan 05 11:24:32 2007 -0500
@@ -208,6 +208,9 @@ class semanageRecords:
class semanageRecords:
def __init__(self):
self.sh = semanage_handle_create()
+ if not self.sh:
+ raise ValueError(_("Could not create semanage
handle"))
+
self.semanaged = semanage_is_managed(self.sh)
if not self.semanaged:
--
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 reply other threads:[~2007-01-05 16:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-05 16:27 Karl MacMillan [this message]
2007-01-05 17:10 ` [PATCH] check for handle creation failures in seobject Karl MacMillan
2007-01-05 19:35 ` Joshua Brindle
2007-01-08 20:48 ` 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=459E7C60.8070308@mentalrootkit.com \
--to=kmacmillan@mentalrootkit.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.