From: cpebenito@tresys.com (Christopher J. PeBenito) Date: Fri, 08 Oct 2010 09:01:36 -0400 Subject: [refpolicy] [ patch 39/44] sudo: wants to manage keys of users besides caller. In-Reply-To: <1286216636-28449-41-git-send-email-domg472@gmail.com> References: <1286216636-28449-1-git-send-email-domg472@gmail.com> <1286216636-28449-41-git-send-email-domg472@gmail.com> Message-ID: <4CAF1630.8080908@tresys.com> To: refpolicy@oss.tresys.com List-Id: refpolicy.oss.tresys.com On 10/04/10 14:23, Dominick Grift wrote: > > Signed-off-by: Dominick Grift Were you hitting this because of a role change? I can't think of any other reason why it might modify other user's keys. > :100644 100644 b194b6d... 1a9e25b... M policy/modules/admin/sudo.if > :100644 100644 35f1476... 595c6f3... M policy/modules/system/userdomain.if > policy/modules/admin/sudo.if | 2 ++ > policy/modules/system/userdomain.if | 18 ++++++++++++++++++ > 2 files changed, 20 insertions(+), 0 deletions(-) > > diff --git a/policy/modules/admin/sudo.if b/policy/modules/admin/sudo.if > index b194b6d..1a9e25b 100644 > --- a/policy/modules/admin/sudo.if > +++ b/policy/modules/admin/sudo.if > @@ -121,6 +121,7 @@ template(`sudo_role_template',` > auth_use_nsswitch($1_sudo_t) > > init_rw_utmp($1_sudo_t) > + init_search_key_script($1_sudo_t) > > logging_send_audit_msgs($1_sudo_t) > logging_send_syslog_msg($1_sudo_t) > @@ -131,6 +132,7 @@ template(`sudo_role_template',` > seutil_libselinux_linked($1_sudo_t) > > userdom_spec_domtrans_all_users($1_sudo_t) > + userdom_manage_all_users_keys($1_sudo_t) > userdom_manage_user_home_content_files($1_sudo_t) > userdom_manage_user_home_content_symlinks($1_sudo_t) > userdom_manage_user_tmp_files($1_sudo_t) > diff --git a/policy/modules/system/userdomain.if b/policy/modules/system/userdomain.if > index 35f1476..595c6f3 100644 > --- a/policy/modules/system/userdomain.if > +++ b/policy/modules/system/userdomain.if > @@ -3119,6 +3119,24 @@ interface(`userdom_create_all_users_keys',` > > ######################################## > ## > +## Manage keys of all users. > +## > +## > +## > +## Domain allowed access. > +## > +## > +# > +interface(`userdom_manage_all_users_keys',` > + gen_require(` > + attribute userdomain; > + ') > + > + allow $1 userdomain:key manage_key_perms; > +') > + > +######################################## > +## > ## Send a dbus message to all user domains. > ## > ## -- Chris PeBenito Tresys Technology, LLC www.tresys.com | oss.tresys.com