43 lines
1,013 B
Text
43 lines
1,013 B
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2021 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = /{usr/,}bin/systemd-sysusers
|
|
profile systemd-sysusers @{exec_path} flags=(attach_disconnected) {
|
|
include <abstractions/base>
|
|
|
|
@{exec_path} mr,
|
|
|
|
# Config file locations
|
|
/etc/sysusers.d/*.conf r,
|
|
@{run}/sysusers.d/*.conf r,
|
|
/usr/lib/sysusers.d/*.conf r,
|
|
|
|
# Where the users can be created,
|
|
/home/{,*} rw,
|
|
/var/{,**} rw,
|
|
/run/{,**} rw,
|
|
|
|
/etc/ r,
|
|
/etc/nsswitch.conf r,
|
|
/etc/{passwd,shadow} rw,
|
|
/etc/{passwd,shadow}- rw,
|
|
/etc/{passwd,shadow}+ rw,
|
|
/etc/.#{passwd,shadow}[0-9a-zA-Z]* rw,
|
|
/etc/{group,gshadow} rw,
|
|
/etc/{group,gshadow}- rw,
|
|
/etc/{group,gshadow}+ rw,
|
|
/etc/.#{group,gshadow}[0-9a-zA-Z]* rw,
|
|
/etc/.pwd.lock rwk,
|
|
|
|
owner @{PROC}/@{pid}/stat r,
|
|
@{PROC}/sys/kernel/random/boot_id r,
|
|
|
|
deny /apparmor/.null rw,
|
|
|
|
include if exists <local/systemd-sysusers>
|
|
}
|