Add two profiles directory to have smaller dir.
This commit is contained in:
parent
6c0ae4ddc1
commit
d95a876424
521 changed files with 0 additions and 0 deletions
64
apparmor.d/profiles-a-f/adduser
Normal file
64
apparmor.d/profiles-a-f/adduser
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2019-2021 Mikhail Morfikov
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /{usr/,}{s,}bin/add{user,group}
|
||||
profile adduser @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/perl>
|
||||
include <abstractions/nameservice-strict>
|
||||
|
||||
# To create a user home dir and give it proper permissions:
|
||||
# mkdir("/home/user", 0755) = 0
|
||||
# chown("/home/user", 1001, 1001) = 0
|
||||
# chmod("/home/user", 0755) = 0
|
||||
capability chown,
|
||||
capability fowner,
|
||||
|
||||
# To set the set-group-ID bit for the user home dir (SETGID_HOME=yes).
|
||||
capability fsetid,
|
||||
|
||||
# To copy files from the /etc/skel/ dir to the newly created user dir, which now has a different
|
||||
# owner.
|
||||
capability dac_read_search,
|
||||
capability dac_override,
|
||||
|
||||
@{exec_path} r,
|
||||
/{usr/,}bin/perl r,
|
||||
|
||||
/{usr/,}bin/{,ba,da}sh rix,
|
||||
/{usr/,}bin/find rix,
|
||||
/{usr/,}bin/rm rix,
|
||||
|
||||
/{usr/,}{s,}bin/useradd rPx,
|
||||
/{usr/,}{s,}bin/userdel rPx,
|
||||
/{usr/,}{s,}bin/groupdel rPx,
|
||||
/{usr/,}{s,}bin/groupadd rPx,
|
||||
/{usr/,}{s,}bin/usermod rPx,
|
||||
/{usr/,}bin/passwd rPx,
|
||||
/{usr/,}bin/gpasswd rPx,
|
||||
/{usr/,}bin/chfn rPx,
|
||||
/{usr/,}bin/chage rPx,
|
||||
|
||||
/etc/{group,passwd,shadow} r,
|
||||
|
||||
/etc/adduser.conf r,
|
||||
|
||||
# To create user dirs
|
||||
@{HOME}/ rw,
|
||||
|
||||
# To copy files from /etc/skel/ to user dirs
|
||||
@{HOME}/.* w,
|
||||
/etc/skel/{,.*} r,
|
||||
|
||||
# What's this for? (#FIXME#)
|
||||
/var/lib/lightdm/{,*} w,
|
||||
/var/lib/sddm/{,*} w,
|
||||
|
||||
include if exists <local/adduser>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue