userhelper_t vs sysadm_userhelper_t
Subsystems (2)
I think that as much as possible the policy should refer to the real domain/type names not aliases. The attached patch fixes this for userhelper_t.
Signature · 4 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page
constraints renamed from usr/src/se/policy/constraints +2 -2
@@ -39,7 +39,7 @@ or (t1 == crond_t and t2 == user_crond_domain) ') ifdef(`userhelper.te', - `or (t1 == userhelper_t)') + `or (t1 == sysadm_userhelper_t)') or (t1 == priv_system_role and u2 == system_u ) );
@@ -49,7 +49,7 @@ or (t1 == crond_t and t2 == user_crond_domain) ') ifdef(`userhelper.te', - `or (t1 == userhelper_t)') + `or (t1 == sysadm_userhelper_t)') or (t1 == priv_system_role and r2 == system_r ) );
Quoted 3 lines · Russell Coker
I think that as much as possible the policy should refer to the real domain/type names not aliases. The attached patch fixes this for
userhelper_t.
Perhaps this part of the constraint needs to be reconsidered. What about the other *_userhelper_t domains? Why is a special case constraint required at all (vs. using privrole and privuser) - is userhelper transitioning directly to program domains in some cases?
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 9 lines · Stephen Smalley
Quoted 3 lines · Russell Coker
I think that as much as possible the policy should refer to the real domain/type names not aliases. The attached patch fixes this for
userhelper_t.Perhaps this part of the constraint needs to be reconsidered. What about the other
*_userhelper_tdomains? Why is a special case constraint required at all (vs. using privrole and privuser) - is userhelper transitioning directly to program domains in some cases?
Ok, userhelper does sometimes perform direct transitions to program domains, e.g. to rpm_t for up2date, based on the TYPE= entry in /etc/security/console.apps/up2date. Hence, the special case constraint is required, and it is required for all userhelper domains, not just sysadm_userhelper_t. Patch below relative to your patch should fix.
Index: policy/attrib.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/attrib.te,v retrieving revision 1.18
attrib.te +3 -0
@@ -188,6 +188,9 @@ # The fs_domain identifies every domain that may directly access a fixed disk attribute fs_domain; +# This attribute is for all domains for the userhelper program. +attribute userhelperdomain; + ############################ # Attributes for file types: #
Index: policy/constraints
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/constraints,v retrieving revision 1.9
constraints +2 -2
@@ -39,7 +39,7 @@ or (t1 == crond_t and (t2 == user_crond_domain or u2 == system_u)) ') ifdef(`userhelper.te', - `or (t1 == sysadm_userhelper_t)') + `or (t1 == userhelperdomain)') or (t1 == priv_system_role and u2 == system_u ) );
@@ -49,7 +49,7 @@ or (t1 == crond_t and t2 == user_crond_domain) ') ifdef(`userhelper.te', - `or (t1 == sysadm_userhelper_t)') + `or (t1 == userhelperdomain)') or (t1 == priv_system_role and r2 == system_r ) );
Index: policy/macros/program/userhelper_macros.te
===================================================================
RCS file: /nfshome/pal/CVS/selinux-usr/policy/macros/program/userhelper_macros.te,v retrieving revision 1.2
macros/program/userhelper_macros.te +1 -1
@@ -17,7 +17,7 @@ ifdef(`single_userdomain', ` typealias $1_t alias $1_userhelper_t; ', ` -type $1_userhelper_t, domain, privlog, privrole, privowner, auth_chkpwd, privfd ifdef(`user_canbe_sysadm', `, privuser'); +type $1_userhelper_t, domain, userhelperdomain, privlog, privrole, privowner, auth_chkpwd, privfd ifdef(`user_canbe_sysadm', `, privuser'); in_user_role($1_userhelper_t) role sysadm_r types $1_userhelper_t;
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.