# apparmor.d - Full set of apparmor profiles # Copyright (C) 2019-2022 Mikhail Morfikov # Copyright (C) 2022 Alexandre Pujol # SPDX-License-Identifier: GPL-2.0-only abi , include @{exec_path} = /{usr/,}bin/passwd profile passwd @{exec_path} { include include include include include capability audit_write, capability chown, capability fsetid, capability setuid, network netlink raw, @{exec_path} mr, /etc/nshadow rw, /etc/shadow rw, /etc/shadow- rw, /etc/shadow.[0-9]* rw, /etc/shadow.lock rwl, /etc/shadow+ rw, # A process first uses lckpwdf() to lock the lock file, thereby gaining exclusive rights to # modify the /etc/passwd or /etc/shadow password database. /etc/.pwd.lock rwk, owner @{PROC}/@{pid}/loginuid r, include if exists }