commit: 733eef5b0f9b79c0b8dd2b5a9ea4020cc0c765f7 Author: Sven Vermeulen <sven.vermeulen <AT> siphos <DOT> be> AuthorDate: Sun Oct 12 08:40:53 2014 +0000 Commit: Sven Vermeulen <swift <AT> gentoo <DOT> org> CommitDate: Sun Oct 12 08:40:53 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/hardened-refpolicy.git;a=commit;h=733eef5b
Allow sudo to create /var/run/sudo if non-existing When sudo is invoked and the /var/run/sudo directory (in which a ts/ subdirectory would be created and managed by sudo) is not available yet, sudo will try to create it. Grant it this privilege and have this directory be labeled as pam_var_run_t. Without this, we get: sudo: unable to mkdir /var/run/sudo: Permission denied --- policy/modules/admin/sudo.if | 3 +++ 1 file changed, 3 insertions(+) diff --git a/policy/modules/admin/sudo.if b/policy/modules/admin/sudo.if index d9114b3..b282877 100644 --- a/policy/modules/admin/sudo.if +++ b/policy/modules/admin/sudo.if @@ -160,6 +160,9 @@ template(`sudo_role_template',` fprintd_dbus_chat($1_sudo_t) ') + ifdef(`distro_gentoo',` + auth_pid_filetrans_pam_var_run($1_sudo_t, dir, "sudo") + ') ') ########################################