All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yi Zhao" <yi.zhao@windriver.com>
To: yocto@lists.yoctoproject.org, joe_macdonald@mentor.com, joe@deserted.net
Subject: [meta-selinux][PATCH 1/3] refpolicy: update file context for chfn/chsh
Date: Wed,  4 Aug 2021 14:49:42 +0800	[thread overview]
Message-ID: <20210804064944.334566-1-yi.zhao@windriver.com> (raw)

The util-linux has provided chfn and chsh since oe-core commit
804c6b5bd3d398d5ea2a45d6bcc23c76e328ea3f. Update the file context for
them.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 ...ge-update-file-context-for-chfn-chsh.patch | 34 +++++++++++++++++++
 .../refpolicy/refpolicy_common.inc            |  1 +
 2 files changed, 35 insertions(+)
 create mode 100644 recipes-security/refpolicy/refpolicy/0091-fc-usermanage-update-file-context-for-chfn-chsh.patch

diff --git a/recipes-security/refpolicy/refpolicy/0091-fc-usermanage-update-file-context-for-chfn-chsh.patch b/recipes-security/refpolicy/refpolicy/0091-fc-usermanage-update-file-context-for-chfn-chsh.patch
new file mode 100644
index 0000000..370bc64
--- /dev/null
+++ b/recipes-security/refpolicy/refpolicy/0091-fc-usermanage-update-file-context-for-chfn-chsh.patch
@@ -0,0 +1,34 @@
+From 311d4759340f2af1e1e157d571802e4367e0a46b Mon Sep 17 00:00:00 2001
+From: Yi Zhao <yi.zhao@windriver.com>
+Date: Mon, 2 Aug 2021 09:38:39 +0800
+Subject: [PATCH] fc/usermanage: update file context for chfn/chsh
+
+The util-linux has provided chfn and chsh since oe-core commit
+804c6b5bd3d398d5ea2a45d6bcc23c76e328ea3f. Update the file context for
+them.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
+---
+ policy/modules/admin/usermanage.fc | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/policy/modules/admin/usermanage.fc b/policy/modules/admin/usermanage.fc
+index 6a051f8a5..bf1ff09ab 100644
+--- a/policy/modules/admin/usermanage.fc
++++ b/policy/modules/admin/usermanage.fc
+@@ -5,8 +5,10 @@ ifdef(`distro_debian',`
+ /usr/bin/chage		--	gen_context(system_u:object_r:passwd_exec_t,s0)
+ /usr/bin/chfn		--	gen_context(system_u:object_r:chfn_exec_t,s0)
+ /usr/bin/chfn\.shadow		--	gen_context(system_u:object_r:chfn_exec_t,s0)
++/usr/bin/chfn\.util-linux		--	gen_context(system_u:object_r:chfn_exec_t,s0)
+ /usr/bin/chsh		--	gen_context(system_u:object_r:chfn_exec_t,s0)
+ /usr/bin/chsh\.shadow		--	gen_context(system_u:object_r:chfn_exec_t,s0)
++/usr/bin/chsh\.util-linux		--	gen_context(system_u:object_r:chfn_exec_t,s0)
+ /usr/bin/crack_[a-z]*	--	gen_context(system_u:object_r:crack_exec_t,s0)
+ /usr/bin/cracklib-[a-z]* --	gen_context(system_u:object_r:crack_exec_t,s0)
+ /usr/bin/gpasswd	--	gen_context(system_u:object_r:groupadd_exec_t,s0)
+-- 
+2.17.1
+
diff --git a/recipes-security/refpolicy/refpolicy_common.inc b/recipes-security/refpolicy/refpolicy_common.inc
index 6e460cb..1bacaa9 100644
--- a/recipes-security/refpolicy/refpolicy_common.inc
+++ b/recipes-security/refpolicy/refpolicy_common.inc
@@ -108,6 +108,7 @@ SRC_URI += " \
         file://0088-policy-modules-services-bind-make-named_t-domain-MLS.patch \
         file://0089-policy-modules-services-rpc-make-rpcd_t-MLS-trusted-.patch \
         file://0090-policy-modules-system-systemd-make-_systemd_t-MLS-tr.patch \
+        file://0091-fc-usermanage-update-file-context-for-chfn-chsh.patch \
         "
 
 S = "${WORKDIR}/refpolicy"
-- 
2.25.1


             reply	other threads:[~2021-08-04  6:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  6:49 Yi Zhao [this message]
2021-08-04  6:49 ` [meta-selinux][PATCH 2/3] layer.conf: set default refpolicy provider Yi Zhao
2021-08-04  6:49 ` [meta-selinux][PATCH 3/3] meta-selinux: convert to new override syntax Yi Zhao

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=20210804064944.334566-1-yi.zhao@windriver.com \
    --to=yi.zhao@windriver.com \
    --cc=joe@deserted.net \
    --cc=joe_macdonald@mentor.com \
    --cc=yocto@lists.yoctoproject.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.