what's wrong this this rule?
allow setfiles_t file_type:dir_file_class_set { getattr relabelfrom relabelto };
Above is the rule, below is a sample of the error I get when running setfiles with it.
avc: denied { relabelto } for pid=6893 exe=/usr/sbin/setfiles path=/etc/security/selinux/policy.9 dev=03:02 ino=1281 scontext=rjc:sysadm_r:setfiles_t tcontext=system_u:object_r:policy_config_t tclass=file
The reason I'm doing this is that I've got some code running as initrc_t that needs to run setfiles, and I don't want to give initrc_t such total write access.
The code in question hopefully won't be running in initrc_t for much longer, but then I'll have the same issue but with a different source domain.
Signature · 9 lines
If you send email to me or to a mailing list that I use which has >4 lines of legalistic junk at the end then you are specifically authorizing me to do whatever I wish with the message and all other messages from your domain, by posting the message you agree that your long legalistic sig is void. -- You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 10 lines · Russell Coker
allow
setfiles_tfile_type:dir_file_class_set { getattr relabelfrom relabelto };Above is the rule, below is a sample of the error I get when running setfiles with it.
avc: denied { relabelto } for pid=6893 exe=/usr/sbin/setfiles path=/etc/security/selinux/policy.9 dev=03:02 ino=1281 scontext=rjc:sysadm_r:setfiles_t tcontext=system_u:object_r:policy_config_t tclass=file
Since the user identity attribute differs (rjc vs. system_u), the permission is being denied by a constraint. If you add the 'privowner' attribute to setfiles_t, then this will be allowed.
--
Stephen D. Smalley, NAI Labs
[email protected]
--
You have received this message because you are subscribed to the selinux list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.