Skip to contentSkip to conversation

how to change the context of running process

DISCUSSION bigclouds 2 participants 2 messages Feb 10, 2014 – Feb 11, 2014 SELinux security module

lore
Share & tools
lore

bigclouds

author
#0 lore raw

hi,all
1.
how to change the context of running process.
2.
in my case, libvirtd is initrc_t, how to find where and which file defines this rule? libvirtd should be virtd_t, i want to correct it.

3.audot2allow outputs a rule ,'allow initrc_t svirt_t:process transition' is there a comamnd line tool can finish this request? not to install .pp module?

thanks

#1 lore raw
Quoted 6 lines · bigclouds

hi,all
1.
how to change the context of running process.
2.
in my case, libvirtd is initrc_t, how to find where and which file defines this rule? libvirtd should be virtd_t, i want to correct it.

The scontext should be virtd_exec_t, and the process context should be virtd_t, it is defined in virt.fc.

./policy/modules/contrib/virt.fc:/usr/sbin/libvirtd -- gen_context(system_u:object_r:virtd_exec_t,s0)

Please make sure the libvirtd is installed into correct path.

Quoted 2 lines

3.audot2allow outputs a rule ,'allow initrc_t svirt_t:process transition' is there a comamnd line tool can finish this request? not to install .pp module?

the correct transition rule should be

./virt.tmp: allow initrc_t virtd_t:process transition;
./virt.tmp: type_transition initrc_t virtd_exec_t:process virtd_t;

-Roy

Quoted 12 lines

thanks

_______________________________________________
Selinux mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to [email protected].

Signature · 2 lines
Best Reagrds,
Roy | RongQing Li