From 195668016061f663ad40e29c6de8e2a2fd4fe5d8 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Wed, 15 Sep 2021 20:44:40 +0100 Subject: [PATCH] Add userdbctl. --- apparmor.d/groups/systemd/userdbctl | 31 +++++++++++++++++++++++++++++ profiles.flags | 1 + 2 files changed, 32 insertions(+) create mode 100644 apparmor.d/groups/systemd/userdbctl diff --git a/apparmor.d/groups/systemd/userdbctl b/apparmor.d/groups/systemd/userdbctl new file mode 100644 index 000000000..f2a1a2e09 --- /dev/null +++ b/apparmor.d/groups/systemd/userdbctl @@ -0,0 +1,31 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/userdbctl +profile userdbctl @{exec_path} { + include + include + + capability dac_read_search, + capability sys_resource, + + @{exec_path} mr, + + /{usr/,}bin/less rPx -> child-pager, + + /etc/group r, + /etc/shadow r, + /etc/gshadow r, + + @{run}/systemd/userdb/ r, + + @{PROC}/@{pid}/cgroup r, + @{PROC}/sys/kernel/random/boot_id r, + + include if exists +} \ No newline at end of file diff --git a/profiles.flags b/profiles.flags index df17a8557..47b78e069 100644 --- a/profiles.flags +++ b/profiles.flags @@ -170,6 +170,7 @@ umount.udisks2 complain update-ca-trust complain update-mime-database complain update-pciids complain +userdbctl complain virt-manager attach_disconnected,complain virtlockd complain virtlogd complain