check for handle creation failures in seobject
PATCH 1/1 check for handle creation failures in seobject
seobject.py assumes that handle creation always succeeds, though this is not always the case. This patch checks for that failure.
policycoreutils/semanage/seobject.py +3 -0
@@ -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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 4 lines · Karl MacMillan
seobject.pyassumes that handle creation always succeeds, though this is not always the case. This patch checks for that failure.Signed-off-by Karl MacMillan <[email protected]>
Another try without line wrapping and with tabs instead of spaces.
policycoreutils/semanage/seobject.py +3 -0
@@ -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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Joshua Brindle
Acked-byQuoted 16 lines · Karl MacMillan
Quoted 4 lines · Karl MacMillan
seobject.pyassumes that handle creation always succeeds, though this is not always the case. This patch checks for that failure.Signed-off-by Karl MacMillan <[email protected]>Another try without line wrapping and with tabs instead of spaces.
diff -r
5e7683c788a4policycoreutils/semanage/seobject.py
---a/policycoreutils/semanage/seobject.pyFri Jan 05 12:05:19 2007
-0500
+++b/policycoreutils/semanage/seobject.pyFri Jan 05 12:08:34 2007
-0500
policycoreutils/semanage/seobject.py class semanageRecords: · line 216
Quoted 9 lines
policycoreutils/semanage/seobject.py +3
-0@@ -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 [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 9 lines · Karl MacMillan
Quoted 4 lines · Karl MacMillan
seobject.pyassumes that handle creation always succeeds, though this is not always the case. This patch checks for that failure.Signed-off-by Karl MacMillan <[email protected]>Another try without line wrapping and with tabs instead of spaces.
Merged this along with the libsemanage error code propagation and the disk reduction patches as of libsemanage 1.9.2 and policycoreutils 1.33.10
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.