Subject: Re: some errors in installing pp From: Karl MacMillan To: Stephen Smalley Cc: "Nerazzurri.YANG" , selinux@tycho.nsa.gov In-Reply-To: <1174667320.31436.236.camel@moss-spartans.epoch.ncsc.mil> References: <4603749D.2020106@gmail.com> <1174653268.31436.170.camel@moss-spartans.epoch.ncsc.mil> <1174665064.12383.12.camel@localhost.localdomain> <1174667320.31436.236.camel@moss-spartans.epoch.ncsc.mil> Content-Type: text/plain Date: Fri, 23 Mar 2007 16:48:07 -0400 Message-Id: <1174682887.3169.3.camel@localhost.localdomain> Mime-Version: 1.0 Sender: owner-selinux@tycho.nsa.gov List-Id: selinux@tycho.nsa.gov On Fri, 2007-03-23 at 12:28 -0400, Stephen Smalley wrote: > On Fri, 2007-03-23 at 11:51 -0400, Karl MacMillan wrote: > > On Fri, 2007-03-23 at 08:34 -0400, Stephen Smalley wrote: > > > On Fri, 2007-03-23 at 14:33 +0800, Nerazzurri.YANG wrote: > > > > type self; > > > > > > Remove the 'type self;' line. Did you add that manually or was it > > > generated by the new audit2allow? If the latter, that is a bug. > > > > > > > That is a strange bug (if it is - I can't reproduce locally): > > > > * The way audit2allow works is that self is never stored in the rules, > > it is only converted at the point it is output. I did that specifically > > to avoid having to special case for self. So it should never add self as > > a require. > > Oops - this is what I wanted to do, but it is not actually possible. With multiple source types you can't detect self at output time. > > * None of the rules reference self. > > > > So, if this was generated by audit2allow could you give me the rpm > > version for policycoreutils and the log file that generated the policy. > > Reproduced with latest upstream version, via: > # audit2allow -a -r | grep self > type self; > allow netutils_t self:capability sys_module; Patch below fixes this. Signed-off-by: Karl MacMillan diff -r 597d85c85841 sepolgen/src/sepolgen/policygen.py --- a/sepolgen/src/sepolgen/policygen.py Wed Mar 21 16:38:20 2007 -0400 +++ b/sepolgen/src/sepolgen/policygen.py Fri Mar 23 16:44:05 2007 -0400 @@ -334,6 +334,8 @@ def gen_requires(module): # can actually figure those out. r.types.add(arg) + r.types.discard("self") + node.children.insert(0, r) # FUTURE - this is untested on modules with any sort of -- 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.