apparmor/nscd-systemd-userdb.diff
2023-02-02 17:23:48 +00:00

37 lines
1.2 KiB
Diff

From https://gitlab.com/apparmor/apparmor/-/merge_requests/977
From cb83ab51636e93371225c21906e01821b5b4261a Mon Sep 17 00:00:00 2001
From: Christian Boltz <apparmor@cboltz.de>
Date: Mon, 30 Jan 2023 12:26:31 +0100
Subject: [PATCH] nscd: allow using systemd-userdb
If systemd-userdb is used to configure some users, nscd needs to read
the userdb files.
See also https://www.freedesktop.org/software/systemd/man/nss-systemd.html
for the list of possible filenames (and symlinks).
Fixes: http://bugzilla.opensuse.org/show_bug.cgi?id=1207698
---
profiles/apparmor.d/usr.sbin.nscd | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/profiles/apparmor.d/usr.sbin.nscd b/profiles/apparmor.d/usr.sbin.nscd
index 80f970988..baa858ea6 100644
--- a/profiles/apparmor.d/usr.sbin.nscd
+++ b/profiles/apparmor.d/usr.sbin.nscd
@@ -41,6 +41,10 @@ profile nscd /usr/{bin,sbin}/nscd {
@{PROC}/@{pid}/fd/* r,
@{PROC}/@{pid}/mounts r,
+ # systemd-userdb
+ /{etc,run,run/host,/usr/lib}/userdb/ r,
+ /{etc,run,run/host,/usr/lib}/userdb/*.{user,user-privileged,group,group-privileged} r,
+
# Site-specific additions and overrides. See local/README for details.
include if exists <local/usr.sbin.nscd>
}
--
GitLab