Re: help adding a type attribute to a domain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 03/11/2011 09:47 PM, Maria Iano wrote:
> 
> On Mar 11, 2011, at 12:10 PM, Dominick Grift wrote:
> 
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 03/11/2011 06:04 PM, Maria Iano wrote:
>>>
>>> On Mar 11, 2011, at 11:48 AM, Dominick Grift wrote:
>>>
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> On 03/11/2011 05:42 PM, Daniel J Walsh wrote:
>>>>> On 03/11/2011 10:57 AM, Maria Iano wrote:
>>>>>> I'm getting a denial that audit2why says is due to constraints.
>>>>>> Sesearch does show that the action has an allow rule.
>>>>>
>>>>>> Here are the audit messages:
>>>>>
>>>>>> host=eng-vocngcn03.eng.gci type=AVC
>>>>>> msg=audit(1299844473.770:740848):
>>>>>> avc:  denied  { sigkill } for  pid=22927 comm="kill"
>>>>>> scontext=system_u:system_r:rgmanager_t:s0
>>>>>> tcontext=system_u:system_r:unconfined_t:s0-s0:c0.c1023
>>>>>> tclass=process
>>>>>
>>>>>> host=eng-vocngcn03.eng.gci type=SYSCALL
>>>>>> msg=audit(1299844473.770:740848): arch=c000003e syscall=62
>>>>>> success=yes
>>>>>> exit=0 a0=19ba a1=9 a2=9 a3=0 items=0 ppid=20173 pid=22927
>>>>>> auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0
>>>>>> fsgid=0 tty=(none) ses=4294967295 comm="kill" exe="/bin/kill"
>>>>>> subj=system_u:system_r:rgmanager_t:s0 key=(null)
>>>>>
>>>>> You have rgmanager sending a kill signal to a process running as
>>>>> unconfined_t
>>>>
>>>> There is no proof that its rgmanager doing that imho. Since
>>>> rgmanager_t
>>>> is an unconfined_domain it could be any generic application started
>>>> by a
>>>> process running in the rgmanager_t domain (eventually started by
>>>> rgmanager)
>>>>
>>>
>>> We have red hat clustering running on the server, and the clustering
>>> processes are running as rgmanager_t. When we move a service off the
>>> server to another node, the clustering software calls a vendor script
>>> like the red hat init.d scripts, with the stop command. That vendor
>>> script calls another script which is a stop script. That stop scripts
>>> if full of kill commands - that match all running processes against
>>> various expressions and kill them.
>>>
>>> We do have a custom policy with a bunch of allow rules but none of
>>> them allow a domain transition.
>>
>> Yes i think i have a reasonable good idea now of what is going on. The
>> easiest solution to the constraint issue would probably be to run
>> rgmanager_t on s0 - mcs_systemhigh.
>>
>> policy_module(myrgmanager, 1.0.0)
>>
>> gen_require(`
>> type rgmanager_t, rgmanager_exec_t;
>> ')
>>
>> init_ranged_daemon_domain(rgmanager_t, rgmanager_exec_t, s0 -
>> mcs_systemhigh)
>>
>> make -f /usr/share/selinux/devel/Makefile myrgmanager.pp
>> sudo semodule -i myrgmanager.pp
>>
>> (may or may not fix the mcs constraint issues)
>>
>>
> 
> I added those lines to my .te file and got this error:
> 
> [root@eng-vocdeviodb01 ~]# make -f /usr/share/selinux/devel/Makefile
> ngiodb.pp
> Compiling targeted ngiodb module
> /usr/bin/checkmodule:  loading policy configuration from tmp/ngiodb.tmp
> ngiodb.te:117:ERROR 'unknown class fd used in rule' at token ';' on line
> 93504:
>         allow rgmanager_t unconfined_t:fd use;
> #line 117
> /usr/bin/checkmodule:  error(s) encountered while parsing configuration
> make: *** [tmp/ngiodb.mod] Error 1
> 
> Am I doing something wrong?

No its probably some el5 quirk. Looks like you would need to require

class fd use;

But i bet that after that then compiler will complain about other
required classes as well.

instead, for now, forget about this solution and try dwalsh'
"mcs_killall(rgmanager_t) solution first. I think that is a bit more
suitable, and if that is not the case we can always resort to my
solution described above later.

echo "policy_module(myrgmanager, 1.0.0) gen_require(\` type rgmanager_t;
') mcs_killall(rgmanager_t)" > myrgmanager.te;
make -f /usr/share/selinux/devel/Makefile myrgmanager.pp
sudo semodule -i myrgmanager.pp



> Thanks,
> Maria

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk16i9sACgkQMlxVo39jgT8pxwCfaLoNtpa5pUfTweZYVGzdYD1W
ZSAAn2ybnQ0vmB0FLG7dnjJf2D5IA09+
=snkC
-----END PGP SIGNATURE-----
--
selinux mailing list
selinux@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/selinux


[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux