All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] check for handle creation failures in seobject
@ 2007-01-05 16:27 Karl MacMillan
  2007-01-05 17:10 ` Karl MacMillan
  0 siblings, 1 reply; 4+ messages in thread
From: Karl MacMillan @ 2007-01-05 16:27 UTC (permalink / raw)
  To: SELinux Mail List

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-08 20:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-05 16:27 [PATCH] check for handle creation failures in seobject Karl MacMillan
2007-01-05 17:10 ` Karl MacMillan
2007-01-05 19:35   ` Joshua Brindle
2007-01-08 20:48   ` Joshua Brindle

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.