All of lore.kernel.org
 help / color / mirror / Atom feed
* some errors in installing pp
@ 2007-03-23  6:33 Nerazzurri.YANG
  2007-03-23 12:34 ` Stephen Smalley
  0 siblings, 1 reply; 10+ messages in thread
From: Nerazzurri.YANG @ 2007-03-23  6:33 UTC (permalink / raw)
  To: selinux


hi all,

i install a local pp in fc7 rawhide, but there are
some errors, i do not understand:

libsepol.print_missing_requirements: mymono's global requirements were 
not met: type/attribute self
libsemanage.semanage_link_sandbox: Link packages failed
semodule:  Failed!


my ".te" file is as:


module mymono 1.0;

require {
	type unconfined_t;
	type automount_t;
	type init_t;
	type pcscd_t;
	type default_t;
	type sysfs_t;
	type semanage_t;
	type setroubleshootd_t;
	type xdm_t;
	type initrc_t;
	type bluetooth_t;
	type insmod_t;
	type gpm_t;
	type var_lib_t;
	type hplip_t;
	type unlabeled_t;
	type var_run_t;
	type kernel_t;
	type locate_t;
	type consolekit_t;
	type klogd_t;
	type xdm_xserver_t;
	type httpd_t;
	type hald_acl_t;
	type cupsd_t;
	type nscd_var_run_t;
	type udev_t;
	type rpcd_t;
	type hald_t;
	type rpm_t;
	type getty_t;
	type mono_t;
	type crond_t;
	type random_device_t;
	type self;
	class sock_file write;
	class file { write setattr };
	class dir { search getattr };
	class chr_file read;
}

#============= automount_t ==============
allow automount_t random_device_t:chr_file read;

#============= consolekit_t ==============
allow consolekit_t var_lib_t:dir search;

#============= hald_acl_t ==============
allow hald_acl_t nscd_var_run_t:dir search;

#============= insmod_t ==============
allow insmod_t sysfs_t:file write;

#============= locate_t ==============
allow locate_t unlabeled_t:dir getattr;

#============= mono_t ==============
allow mono_t bluetooth_t:file write;
allow mono_t crond_t:file write;
allow mono_t cupsd_t:file write;
allow mono_t getty_t:file write;
allow mono_t gpm_t:file write;
allow mono_t hald_t:file write;
allow mono_t hplip_t:file write;
allow mono_t httpd_t:file write;
allow mono_t init_t:file write;
allow mono_t initrc_t:file write;
allow mono_t kernel_t:file write;
allow mono_t klogd_t:file write;
allow mono_t pcscd_t:file write;
allow mono_t rpcd_t:file write;
allow mono_t rpm_t:file write;
allow mono_t self:file setattr;
allow mono_t udev_t:file write;
allow mono_t unconfined_t:file { write setattr };
allow mono_t xdm_t:file write;
allow mono_t xdm_xserver_t:file write;

#============= semanage_t ==============
allow semanage_t default_t:dir search;

#============= setroubleshootd_t ==============
allow setroubleshootd_t var_run_t:sock_file write;


the '.te' file is generated by audit2allow:

"cat /var/log/audit/audit.log | audit2allow -M test"

can any guide me the way to understand above errors generated
by semodule.

thanks in advance.


--
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] 10+ messages in thread

* Re: some errors in installing pp
  2007-03-23  6:33 some errors in installing pp Nerazzurri.YANG
@ 2007-03-23 12:34 ` Stephen Smalley
  2007-03-23 15:51   ` Karl MacMillan
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Smalley @ 2007-03-23 12:34 UTC (permalink / raw)
  To: Nerazzurri.YANG; +Cc: selinux, Karl MacMillan

On Fri, 2007-03-23 at 14:33 +0800, Nerazzurri.YANG wrote:
> hi all,
> 
> i install a local pp in fc7 rawhide, but there are
> some errors, i do not understand:
> 
> libsepol.print_missing_requirements: mymono's global requirements were 
> not met: type/attribute self
> libsemanage.semanage_link_sandbox: Link packages failed
> semodule:  Failed!
> 
> 
> my ".te" file is as:
> 
> 
> module mymono 1.0;
> 
> require {
> 	type unconfined_t;
> 	type automount_t;
> 	type init_t;
> 	type pcscd_t;
> 	type default_t;
> 	type sysfs_t;
> 	type semanage_t;
> 	type setroubleshootd_t;
> 	type xdm_t;
> 	type initrc_t;
> 	type bluetooth_t;
> 	type insmod_t;
> 	type gpm_t;
> 	type var_lib_t;
> 	type hplip_t;
> 	type unlabeled_t;
> 	type var_run_t;
> 	type kernel_t;
> 	type locate_t;
> 	type consolekit_t;
> 	type klogd_t;
> 	type xdm_xserver_t;
> 	type httpd_t;
> 	type hald_acl_t;
> 	type cupsd_t;
> 	type nscd_var_run_t;
> 	type udev_t;
> 	type rpcd_t;
> 	type hald_t;
> 	type rpm_t;
> 	type getty_t;
> 	type mono_t;
> 	type crond_t;
> 	type random_device_t;
> 	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.

> 	class sock_file write;
> 	class file { write setattr };
> 	class dir { search getattr };
> 	class chr_file read;
> }
> 
> #============= automount_t ==============
> allow automount_t random_device_t:chr_file read;
> 
> #============= consolekit_t ==============
> allow consolekit_t var_lib_t:dir search;
> 
> #============= hald_acl_t ==============
> allow hald_acl_t nscd_var_run_t:dir search;
> 
> #============= insmod_t ==============
> allow insmod_t sysfs_t:file write;
> 
> #============= locate_t ==============
> allow locate_t unlabeled_t:dir getattr;
> 
> #============= mono_t ==============
> allow mono_t bluetooth_t:file write;
> allow mono_t crond_t:file write;
> allow mono_t cupsd_t:file write;
> allow mono_t getty_t:file write;
> allow mono_t gpm_t:file write;
> allow mono_t hald_t:file write;
> allow mono_t hplip_t:file write;
> allow mono_t httpd_t:file write;
> allow mono_t init_t:file write;
> allow mono_t initrc_t:file write;
> allow mono_t kernel_t:file write;
> allow mono_t klogd_t:file write;
> allow mono_t pcscd_t:file write;
> allow mono_t rpcd_t:file write;
> allow mono_t rpm_t:file write;
> allow mono_t self:file setattr;
> allow mono_t udev_t:file write;
> allow mono_t unconfined_t:file { write setattr };
> allow mono_t xdm_t:file write;
> allow mono_t xdm_xserver_t:file write;
> 
> #============= semanage_t ==============
> allow semanage_t default_t:dir search;
> 
> #============= setroubleshootd_t ==============
> allow setroubleshootd_t var_run_t:sock_file write;
> 
> 
> the '.te' file is generated by audit2allow:
> 
> "cat /var/log/audit/audit.log | audit2allow -M test"
> 
> can any guide me the way to understand above errors generated
> by semodule.
> 
> thanks in advance.
> 
> 
> --
> 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.
-- 
Stephen Smalley
National Security Agency


--
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] 10+ messages in thread

* Re: some errors in installing pp
  2007-03-23 12:34 ` Stephen Smalley
@ 2007-03-23 15:51   ` Karl MacMillan
  2007-03-23 16:28     ` Stephen Smalley
  0 siblings, 1 reply; 10+ messages in thread
From: Karl MacMillan @ 2007-03-23 15:51 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: Nerazzurri.YANG, selinux

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.

* 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.

Thanks,

Karl


--
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] 10+ messages in thread

* Re: some errors in installing pp
  2007-03-23 15:51   ` Karl MacMillan
@ 2007-03-23 16:28     ` Stephen Smalley
  2007-03-23 16:43       ` Stephen Smalley
  2007-03-23 20:48       ` Karl MacMillan
  0 siblings, 2 replies; 10+ messages in thread
From: Stephen Smalley @ 2007-03-23 16:28 UTC (permalink / raw)
  To: Karl MacMillan; +Cc: Nerazzurri.YANG, selinux

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.
> 
> * 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;

# /sbin/ausearch -m avc | grep netutils
type=SYSCALL msg=audit(1171312181.384:47): arch=40000003 syscall=54
success=no exit=-19 a0=3 a1=8933 a2=bf961380 a3=bf961380 items=0
ppid=5860 pid=5961 auid=4204 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0
sgid=0 fsgid=0 tty=pts0 comm="arping" exe="/sbin/arping"
subj=user_u:system_r:netutils_t:s0 key=(null)
type=AVC msg=audit(1171312181.384:47): avc:  denied  { sys_module } for
pid=5961 comm="arping" capability=16
scontext=user_u:system_r:netutils_t:s0
tcontext=user_u:system_r:netutils_t:s0 tclass=capability

-- 
Stephen Smalley
National Security Agency


--
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] 10+ messages in thread

* Re: some errors in installing pp
  2007-03-23 16:28     ` Stephen Smalley
@ 2007-03-23 16:43       ` Stephen Smalley
  2007-03-23 16:45         ` Stephen Smalley
  2007-03-23 20:48       ` Karl MacMillan
  1 sibling, 1 reply; 10+ messages in thread
From: Stephen Smalley @ 2007-03-23 16:43 UTC (permalink / raw)
  To: Karl MacMillan; +Cc: Nerazzurri.YANG, selinux

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.
> > 
> > * 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;
> 
> # /sbin/ausearch -m avc | grep netutils
> type=SYSCALL msg=audit(1171312181.384:47): arch=40000003 syscall=54
> success=no exit=-19 a0=3 a1=8933 a2=bf961380 a3=bf961380 items=0
> ppid=5860 pid=5961 auid=4204 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0
> sgid=0 fsgid=0 tty=pts0 comm="arping" exe="/sbin/arping"
> subj=user_u:system_r:netutils_t:s0 key=(null)
> type=AVC msg=audit(1171312181.384:47): avc:  denied  { sys_module } for
> pid=5961 comm="arping" capability=16
> scontext=user_u:system_r:netutils_t:s0
> tcontext=user_u:system_r:netutils_t:s0 tclass=capability

refpolicy.py adds "self" to target types in from_av.

-- 
Stephen Smalley
National Security Agency


--
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] 10+ messages in thread

* Re: some errors in installing pp
  2007-03-23 16:43       ` Stephen Smalley
@ 2007-03-23 16:45         ` Stephen Smalley
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Smalley @ 2007-03-23 16:45 UTC (permalink / raw)
  To: Karl MacMillan; +Cc: Nerazzurri.YANG, selinux

On Fri, 2007-03-23 at 12:43 -0400, Stephen Smalley wrote:
> 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.
> > > 
> > > * 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;
> > 
> > # /sbin/ausearch -m avc | grep netutils
> > type=SYSCALL msg=audit(1171312181.384:47): arch=40000003 syscall=54
> > success=no exit=-19 a0=3 a1=8933 a2=bf961380 a3=bf961380 items=0
> > ppid=5860 pid=5961 auid=4204 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0
> > sgid=0 fsgid=0 tty=pts0 comm="arping" exe="/sbin/arping"
> > subj=user_u:system_r:netutils_t:s0 key=(null)
> > type=AVC msg=audit(1171312181.384:47): avc:  denied  { sys_module } for
> > pid=5961 comm="arping" capability=16
> > scontext=user_u:system_r:netutils_t:s0
> > tcontext=user_u:system_r:netutils_t:s0 tclass=capability
> 
> refpolicy.py adds "self" to target types in from_av.

r2279 | kmacmillan | 2007-03-01 14:08:38 -0500 (Thu, 01 Mar 2007) | 15 lines

Author: Karl MacMillan
Email: kmacmillan@mentalrootkit.com
Subject: sepolgen: better match refpolicy style in output
Date: Thu, 01 Mar 2007 11:39:09 -0500

This patch makes the output of sepolgen better match the reference
policy by:

* removing the space between target types and object classes (e.g., 
  allow foo bar:file read).
* using self when the source and target match.

Signed-off-by: Karl MacMillan <kmacmillan@mentalrootkit.com>

-- 
Stephen Smalley
National Security Agency


--
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] 10+ messages in thread

* Re: some errors in installing pp
  2007-03-23 16:28     ` Stephen Smalley
  2007-03-23 16:43       ` Stephen Smalley
@ 2007-03-23 20:48       ` Karl MacMillan
  2007-03-24 12:53         ` Nerazzurri.YANG
  2007-03-26 15:03         ` Stephen Smalley
  1 sibling, 2 replies; 10+ messages in thread
From: Karl MacMillan @ 2007-03-23 20:48 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: Nerazzurri.YANG, selinux

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 <kmacmillan@mentalrootkit.com>

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.

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

* Re: some errors in installing pp
  2007-03-23 20:48       ` Karl MacMillan
@ 2007-03-24 12:53         ` Nerazzurri.YANG
  2007-03-26 14:52           ` Karl MacMillan
  2007-03-26 15:03         ` Stephen Smalley
  1 sibling, 1 reply; 10+ messages in thread
From: Nerazzurri.YANG @ 2007-03-24 12:53 UTC (permalink / raw)
  To: Karl MacMillan; +Cc: Stephen Smalley, selinux

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030; format=flowed, Size: 2723 bytes --]

Karl MacMillan wrote:
> 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.


sorry to reply late, you know it's weekend, and we are in different
time zone.

it seems that the problem has been resolved. i will apply the patch
and try again.

but i will still give the info you ask, i think it's helpful for you.

i am in fc7 rawhide (test3 6.92).
the rpm version of policycoreutils is: policycoreutils-2.0.7-4.fc7

now that there is patch for the problem, so i will not attach the log
file, it's so big.

by the way, the reason i use audit2allow to generate pp, it's to resolve
the problem of mono(beagle), i have sent the details to
"fedora-selinux-list", and Mr walsh has posted it to the list.

anyway, thank you very much



> 
> Signed-off-by: Karl MacMillan <kmacmillan@mentalrootkit.com>
> 
> 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.

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

* Re: some errors in installing pp
  2007-03-24 12:53         ` Nerazzurri.YANG
@ 2007-03-26 14:52           ` Karl MacMillan
  0 siblings, 0 replies; 10+ messages in thread
From: Karl MacMillan @ 2007-03-26 14:52 UTC (permalink / raw)
  To: Nerazzurri.YANG; +Cc: Stephen Smalley, selinux

On Sat, 2007-03-24 at 20:53 +0800, Nerazzurri.YANG wrote:
> Karl MacMillan wrote:
> > 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.
> 
> 
> sorry to reply late, you know it's weekend, and we are in different
> time zone.
> 
> it seems that the problem has been resolved. i will apply the patch
> and try again.
> 
> but i will still give the info you ask, i think it's helpful for you.
> 

Thanks for the info. Let me know if the patch doesn't resolve things.

Karl




--
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] 10+ messages in thread

* Re: some errors in installing pp
  2007-03-23 20:48       ` Karl MacMillan
  2007-03-24 12:53         ` Nerazzurri.YANG
@ 2007-03-26 15:03         ` Stephen Smalley
  1 sibling, 0 replies; 10+ messages in thread
From: Stephen Smalley @ 2007-03-26 15:03 UTC (permalink / raw)
  To: Karl MacMillan; +Cc: Nerazzurri.YANG, selinux

On Fri, 2007-03-23 at 16:48 -0400, Karl MacMillan wrote:
> 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 <kmacmillan@mentalrootkit.com>
> 
> 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

Thanks, applied as sepolgen 1.0.7.

-- 
Stephen Smalley
National Security Agency


--
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] 10+ messages in thread

end of thread, other threads:[~2007-03-26 15:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-23  6:33 some errors in installing pp Nerazzurri.YANG
2007-03-23 12:34 ` Stephen Smalley
2007-03-23 15:51   ` Karl MacMillan
2007-03-23 16:28     ` Stephen Smalley
2007-03-23 16:43       ` Stephen Smalley
2007-03-23 16:45         ` Stephen Smalley
2007-03-23 20:48       ` Karl MacMillan
2007-03-24 12:53         ` Nerazzurri.YANG
2007-03-26 14:52           ` Karl MacMillan
2007-03-26 15:03         ` Stephen Smalley

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.