All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: Karl MacMillan <kmacmillan@mentalrootkit.com>
Cc: SELinux Mail List <selinux@tycho.nsa.gov>
Subject: Re: [PATCH] check for handle creation failures in seobject
Date: Fri, 05 Jan 2007 12:10:10 -0500	[thread overview]
Message-ID: <459E8672.3060708@mentalrootkit.com> (raw)
In-Reply-To: <459E7C60.8070308@mentalrootkit.com>

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.

  reply	other threads:[~2007-01-05 17:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-05 16:27 [PATCH] check for handle creation failures in seobject Karl MacMillan
2007-01-05 17:10 ` Karl MacMillan [this message]
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=459E8672.3060708@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.