From: "Kenton Groombridge" <concord@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/hardened-refpolicy:concord-dev commit in: policy/modules/system/
Date: Wed, 12 Oct 2022 13:34:58 +0000 (UTC) [thread overview]
Message-ID: <1662232070.d63d91588adf55e6867440af9b9f6a4fe6c166f6.concord@gentoo> (raw)
commit: d63d91588adf55e6867440af9b9f6a4fe6c166f6
Author: Dave Sugar <dsugar100 <AT> gmail <DOT> com>
AuthorDate: Fri Aug 26 02:45:24 2022 +0000
Commit: Kenton Groombridge <concord <AT> gentoo <DOT> org>
CommitDate: Sat Sep 3 19:07:50 2022 +0000
URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=d63d9158
systemd: init_t creates systemd-logind 'linger' directory
node=localhost type=AVC msg=audit(1661480051.880:321): avc: denied { create } for pid=1027 comm="(d-logind)" name="linger" scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:systemd_logind_var_lib_t:s0 tclass=dir permissive=0
Signed-off-by: Dave Sugar <dsugar100 <AT> gmail.com>
Signed-off-by: Jason Zaman <perfinion <AT> gentoo.org>
policy/modules/system/init.te | 1 +
policy/modules/system/systemd.if | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+)
diff --git a/policy/modules/system/init.te b/policy/modules/system/init.te
index 285ee5b4..9ecaae54 100644
--- a/policy/modules/system/init.te
+++ b/policy/modules/system/init.te
@@ -551,6 +551,7 @@ ifdef(`init_systemd',`
optional_policy(`
systemd_dbus_chat_logind(init_t)
+ systemd_create_logind_linger_dir(init_t)
systemd_search_all_user_keys(init_t)
systemd_create_all_user_keys(init_t)
systemd_write_all_user_keys(init_t)
diff --git a/policy/modules/system/systemd.if b/policy/modules/system/systemd.if
index f48cc541..2370c729 100644
--- a/policy/modules/system/systemd.if
+++ b/policy/modules/system/systemd.if
@@ -2031,6 +2031,27 @@ interface(`systemd_read_logind_state',`
allow systemd_logind_t $1:file read_file_perms;
')
+########################################
+## <summary>
+## Allow the specified domain to create
+## the systemd-logind linger directory with
+## the correct context.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`systemd_create_logind_linger_dir',`
+ gen_require(`
+ type systemd_logind_var_lib_t;
+ ')
+
+ init_var_lib_filetrans($1, systemd_logind_var_lib_t, dir, "linger")
+ allow $1 systemd_logind_var_lib_t:dir create;
+')
+
########################################
## <summary>
## Allow the specified domain to start systemd
next reply other threads:[~2022-10-12 13:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 13:34 Kenton Groombridge [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-10-12 13:35 [gentoo-commits] proj/hardened-refpolicy:concord-dev commit in: policy/modules/system/ Kenton Groombridge
2022-10-12 13:34 Kenton Groombridge
2022-10-12 13:34 Kenton Groombridge
2022-09-03 20:04 [gentoo-commits] proj/hardened-refpolicy:master " Kenton Groombridge
2022-10-12 13:35 ` [gentoo-commits] proj/hardened-refpolicy:concord-dev " Kenton Groombridge
2022-09-03 20:04 [gentoo-commits] proj/hardened-refpolicy:master " Kenton Groombridge
2022-10-12 13:34 ` [gentoo-commits] proj/hardened-refpolicy:concord-dev " Kenton Groombridge
2022-06-06 15:15 Kenton Groombridge
2022-06-06 15:15 Kenton Groombridge
2022-06-06 15:15 Kenton Groombridge
2022-06-06 15:13 [gentoo-commits] proj/hardened-refpolicy:various-20211111 " Kenton Groombridge
2022-06-06 15:13 ` [gentoo-commits] proj/hardened-refpolicy:concord-dev " Kenton Groombridge
2022-06-06 15:13 [gentoo-commits] proj/hardened-refpolicy:various-20211111 " Kenton Groombridge
2022-06-06 15:13 ` [gentoo-commits] proj/hardened-refpolicy:concord-dev " Kenton Groombridge
2022-06-06 15:13 [gentoo-commits] proj/hardened-refpolicy:various-20211111 " Kenton Groombridge
2022-06-06 15:13 ` [gentoo-commits] proj/hardened-refpolicy:concord-dev " Kenton Groombridge
2022-06-06 15:08 Kenton Groombridge
2022-06-06 15:08 Kenton Groombridge
2022-06-06 15:08 Kenton Groombridge
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=1662232070.d63d91588adf55e6867440af9b9f6a4fe6c166f6.concord@gentoo \
--to=concord@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: link
Be 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