mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2025-02-22 18:05:36 +01:00
56 lines
1.3 KiB
Text
56 lines
1.3 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2019-2021 Mikhail Morfikov
|
|
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
abi <abi/3.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = @{bin}/add{user,group}
|
|
profile adduser @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/consoles>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/perl>
|
|
|
|
capability chown,
|
|
capability dac_override,
|
|
capability dac_read_search,
|
|
capability fowner,
|
|
capability fsetid,
|
|
capability setgid,
|
|
capability setuid,
|
|
capability sys_admin, # For logger
|
|
|
|
@{exec_path} r,
|
|
@{bin}/perl r,
|
|
|
|
@{sh_path} rix,
|
|
@{bin}/find rix,
|
|
@{bin}/logger rix,
|
|
@{bin}/rm rix,
|
|
|
|
@{bin}/chage rPx,
|
|
@{bin}/chfn rPx,
|
|
@{bin}/gpasswd rPx,
|
|
@{bin}/groupadd rPx,
|
|
@{bin}/groupdel rPx,
|
|
@{bin}/passwd rPx,
|
|
@{bin}/useradd rPx,
|
|
@{bin}/userdel rPx,
|
|
@{bin}/usermod rPx,
|
|
|
|
/etc/{group,passwd,shadow} r,
|
|
/etc/adduser.conf r,
|
|
/etc/skel/{,.*} r,
|
|
|
|
# To create user dirs and copy files from /etc/skel/ to them
|
|
@{HOME}/ rw,
|
|
@{HOME}/.* w,
|
|
/var/lib/*/{,*} rw,
|
|
|
|
@{run}/adduser wk,
|
|
|
|
include if exists <local/adduser>
|
|
}
|