* [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
* Re: [PATCH] check for handle creation failures in seobject
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
0 siblings, 2 replies; 4+ messages in thread
From: Karl MacMillan @ 2007-01-05 17:10 UTC (permalink / raw)
To: Karl MacMillan; +Cc: SELinux Mail List
Karl MacMillan wrote:
> 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>
>
Another try without line wrapping and with tabs instead of spaces.
diff -r 5e7683c788a4 policycoreutils/semanage/seobject.py
--- a/policycoreutils/semanage/seobject.py Fri Jan 05 12:05:19 2007 -0500
+++ b/policycoreutils/semanage/seobject.py Fri Jan 05 12:08:34 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
* Re: [PATCH] check for handle creation failures in seobject
2007-01-05 17:10 ` Karl MacMillan
@ 2007-01-05 19:35 ` Joshua Brindle
2007-01-08 20:48 ` Joshua Brindle
1 sibling, 0 replies; 4+ messages in thread
From: Joshua Brindle @ 2007-01-05 19:35 UTC (permalink / raw)
To: Karl MacMillan; +Cc: SELinux Mail List
Karl MacMillan wrote:
> Karl MacMillan wrote:
>> 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>
>>
>
> Another try without line wrapping and with tabs instead of spaces.
>
>
> diff -r 5e7683c788a4 policycoreutils/semanage/seobject.py
> --- a/policycoreutils/semanage/seobject.py Fri Jan 05 12:05:19 2007
> -0500
> +++ b/policycoreutils/semanage/seobject.py Fri Jan 05 12:08:34 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:
>
Acked-By: Joshua Brindle <jbrindle@tresys.com>
--
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
* Re: [PATCH] check for handle creation failures in seobject
2007-01-05 17:10 ` Karl MacMillan
2007-01-05 19:35 ` Joshua Brindle
@ 2007-01-08 20:48 ` Joshua Brindle
1 sibling, 0 replies; 4+ messages in thread
From: Joshua Brindle @ 2007-01-08 20:48 UTC (permalink / raw)
To: Karl MacMillan; +Cc: SELinux Mail List
Karl MacMillan wrote:
> Karl MacMillan wrote:
>> 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>
>>
>
> 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 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.