From: "Jason Zaman" <perfinion@gentoo.org> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/system/, policy/modules/kernel/ Date: Fri, 18 Dec 2015 04:14:36 +0000 (UTC) [thread overview] Message-ID: <1450411971.b0cfc980dcefdffcdcf2929394278e3ea983a88c.perfinion@gentoo> (raw) commit: b0cfc980dcefdffcdcf2929394278e3ea983a88c Author: Jason Zaman <jason <AT> perfinion <DOT> com> AuthorDate: Thu Dec 17 18:38:24 2015 +0000 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> CommitDate: Fri Dec 18 04:12:51 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=b0cfc980 Add permissions for ZFS list and send/recv zfs list uses a pipe to get info from the kernel avc: granted { write } for pid=31602 comm="dump_list_strat" path="pipe:[4471132]" dev="pipefs" ino=4471132 scontext=system_u:system_r:kernel_t:s0 tcontext=staff_u:sysadm_r:mount_t:s0-s0:c0.c511 tclass=fifo_file avc: granted { read } for pid=31601 comm="zfs" path="pipe:[4471132]" dev="pipefs" ino=4471132 scontext=staff_u:sysadm_r:mount_t:s0-s0:c0.c511 tcontext=staff_u:sysadm_r:mount_t:s0-s0:c0.c511 tclass=fifo_file zfs send / recv is usually piped somewhere by sysadm zfs send tank@snap | ssh foo tank@snap policy/modules/kernel/kernel.te | 9 +++++++++ policy/modules/system/mount.te | 3 +++ 2 files changed, 12 insertions(+) diff --git a/policy/modules/kernel/kernel.te b/policy/modules/kernel/kernel.te index 4ac22e0..f1016a3 100644 --- a/policy/modules/kernel/kernel.te +++ b/policy/modules/kernel/kernel.te @@ -461,4 +461,13 @@ ifdef(`distro_gentoo',` # See also bug 535992 #dev_manage_all_dev_nodes(kernel_t) dev_setattr_generic_chr_files(kernel_t) + + # ZFS send/recv writes to an fd + optional_policy(` + sysadm_use_fds(kernel_t) + ') + # zfs list writes to a pipe + optional_policy(` + mount_rw_pipes(kernel_t) + ') ') diff --git a/policy/modules/system/mount.te b/policy/modules/system/mount.te index 497fa59..920abc7 100644 --- a/policy/modules/system/mount.te +++ b/policy/modules/system/mount.te @@ -42,6 +42,9 @@ application_domain(unconfined_mount_t, mount_exec_t) # setuid/setgid needed to mount cifs allow mount_t self:capability { ipc_lock sys_rawio sys_admin dac_override chown sys_tty_config setuid setgid }; +allow mount_t self:process signal; +# zfs list uses pipes +allow mount_t self:fifo_file rw_fifo_file_perms; mount_read_loopback_files(mount_t)
WARNING: multiple messages have this Message-ID (diff)
From: "Jason Zaman" <perfinion@gentoo.org> To: gentoo-commits@lists.gentoo.org Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/kernel/, policy/modules/system/ Date: Fri, 18 Dec 2015 04:14:25 +0000 (UTC) [thread overview] Message-ID: <1450411971.b0cfc980dcefdffcdcf2929394278e3ea983a88c.perfinion@gentoo> (raw) Message-ID: <20151218041425.zeHUDTmN1-K6MM4eaHNcZojyyKRGfaWI2-OctlIFjyc@z> (raw) commit: b0cfc980dcefdffcdcf2929394278e3ea983a88c Author: Jason Zaman <jason <AT> perfinion <DOT> com> AuthorDate: Thu Dec 17 18:38:24 2015 +0000 Commit: Jason Zaman <perfinion <AT> gentoo <DOT> org> CommitDate: Fri Dec 18 04:12:51 2015 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=b0cfc980 Add permissions for ZFS list and send/recv zfs list uses a pipe to get info from the kernel avc: granted { write } for pid=31602 comm="dump_list_strat" path="pipe:[4471132]" dev="pipefs" ino=4471132 scontext=system_u:system_r:kernel_t:s0 tcontext=staff_u:sysadm_r:mount_t:s0-s0:c0.c511 tclass=fifo_file avc: granted { read } for pid=31601 comm="zfs" path="pipe:[4471132]" dev="pipefs" ino=4471132 scontext=staff_u:sysadm_r:mount_t:s0-s0:c0.c511 tcontext=staff_u:sysadm_r:mount_t:s0-s0:c0.c511 tclass=fifo_file zfs send / recv is usually piped somewhere by sysadm zfs send tank@snap | ssh foo tank@snap policy/modules/kernel/kernel.te | 9 +++++++++ policy/modules/system/mount.te | 3 +++ 2 files changed, 12 insertions(+) diff --git a/policy/modules/kernel/kernel.te b/policy/modules/kernel/kernel.te index 4ac22e0..f1016a3 100644 --- a/policy/modules/kernel/kernel.te +++ b/policy/modules/kernel/kernel.te @@ -461,4 +461,13 @@ ifdef(`distro_gentoo',` # See also bug 535992 #dev_manage_all_dev_nodes(kernel_t) dev_setattr_generic_chr_files(kernel_t) + + # ZFS send/recv writes to an fd + optional_policy(` + sysadm_use_fds(kernel_t) + ') + # zfs list writes to a pipe + optional_policy(` + mount_rw_pipes(kernel_t) + ') ') diff --git a/policy/modules/system/mount.te b/policy/modules/system/mount.te index 497fa59..920abc7 100644 --- a/policy/modules/system/mount.te +++ b/policy/modules/system/mount.te @@ -42,6 +42,9 @@ application_domain(unconfined_mount_t, mount_exec_t) # setuid/setgid needed to mount cifs allow mount_t self:capability { ipc_lock sys_rawio sys_admin dac_override chown sys_tty_config setuid setgid }; +allow mount_t self:process signal; +# zfs list uses pipes +allow mount_t self:fifo_file rw_fifo_file_perms; mount_read_loopback_files(mount_t)
next reply other threads:[~2015-12-18 4:14 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-12-18 4:14 Jason Zaman [this message] 2015-12-18 4:14 ` [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/kernel/, policy/modules/system/ Jason Zaman -- strict thread matches above, loose matches on Subject: below -- 2017-05-25 17:08 [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/system/, policy/modules/kernel/ Jason Zaman 2017-02-27 10:50 [gentoo-commits] proj/hardened-refpolicy:master " Jason Zaman 2017-02-27 11:40 ` [gentoo-commits] proj/hardened-refpolicy:next " Jason Zaman 2017-02-25 14:59 Jason Zaman 2017-01-01 16:36 [gentoo-commits] proj/hardened-refpolicy:master commit in: policy/modules/kernel/, policy/modules/system/ Jason Zaman 2017-01-01 16:37 ` [gentoo-commits] proj/hardened-refpolicy:next commit in: policy/modules/system/, policy/modules/kernel/ Jason Zaman 2015-12-18 3:49 Jason Zaman 2015-12-17 18:52 Jason Zaman 2015-12-17 18:49 Jason Zaman 2015-12-17 18:49 Jason Zaman 2015-10-26 5:48 [gentoo-commits] proj/hardened-refpolicy:master " Jason Zaman 2015-10-26 5:36 ` [gentoo-commits] proj/hardened-refpolicy:next " Jason Zaman 2015-10-14 18:36 Jason Zaman 2014-11-28 11:01 Sven Vermeulen 2014-11-28 10:44 Sven Vermeulen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1450411971.b0cfc980dcefdffcdcf2929394278e3ea983a88c.perfinion@gentoo \ --to=perfinion@gentoo.org \ --cc=gentoo-commits@lists.gentoo.org \ --cc=gentoo-dev@lists.gentoo.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox