diff --git a/apparmor.d/groups/systemd/userdbctl b/apparmor.d/groups/systemd/userdbctl new file mode 100644 index 00000000..f2a1a2e0 --- /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 df17a855..47b78e06 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