feat(profiles): reorganise a few profiles.
This commit is contained in:
parent
fcbe764ccf
commit
c04363c1b6
6 changed files with 125 additions and 145 deletions
|
|
@ -10,23 +10,14 @@ include <tunables/global>
|
|||
profile adduser @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/perl>
|
||||
include <abstractions/nameservice-strict>
|
||||
include <abstractions/perl>
|
||||
|
||||
# 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,
|
||||
capability dac_read_search,
|
||||
capability fowner,
|
||||
capability fsetid,
|
||||
|
||||
@{exec_path} r,
|
||||
/{usr/,}bin/perl r,
|
||||
|
|
@ -35,25 +26,24 @@ profile adduser @{exec_path} {
|
|||
/{usr/,}bin/find rix,
|
||||
/{usr/,}bin/rm rix,
|
||||
|
||||
/{usr/,}{s,}bin/groupadd rPx,
|
||||
/{usr/,}{s,}bin/groupdel rPx,
|
||||
/{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,
|
||||
/{usr/,}bin/chage rPx,
|
||||
/{usr/,}bin/chfn rPx,
|
||||
/{usr/,}bin/gpasswd rPx,
|
||||
/{usr/,}bin/passwd 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,
|
||||
/etc/skel/{,.*} r,
|
||||
|
||||
include if exists <local/adduser>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue