apparmor.d -> profiles
This commit is contained in:
parent
c408a878b7
commit
e9b8e62fcd
726 changed files with 0 additions and 0 deletions
68
profiles/su
Normal file
68
profiles/su
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
# vim:syntax=apparmor
|
||||
# ------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (C) 2019-2021 Mikhail Morfikov
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of version 2 of the GNU General Public
|
||||
# License published by the Free Software Foundation.
|
||||
#
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
abi <abi/3.0>,
|
||||
|
||||
include <tunables/global>
|
||||
|
||||
@{exec_path} = /{usr/,}bin/su
|
||||
profile su @{exec_path} {
|
||||
include <abstractions/base>
|
||||
include <abstractions/consoles>
|
||||
include <abstractions/authentication>
|
||||
include <abstractions/wutmp>
|
||||
include <abstractions/nameservice-strict>
|
||||
# include <pam/mappings>
|
||||
|
||||
# To remove the following errors:
|
||||
# su: cannot set groups: Operation not permitted
|
||||
capability setgid,
|
||||
|
||||
# To remove the following errors:
|
||||
# su: cannot set user id: Operation not permitted
|
||||
capability setuid,
|
||||
|
||||
# To write records to the kernel auditing log.
|
||||
capability audit_write,
|
||||
|
||||
# Needed?
|
||||
audit deny capability net_bind_service,
|
||||
|
||||
signal (send) set=(term,kill),
|
||||
signal (receive) set=(int,quit,term),
|
||||
|
||||
network netlink raw,
|
||||
|
||||
@{exec_path} mr,
|
||||
|
||||
# Shells to use
|
||||
/{usr/,}bin/{,b,d,rb}ash rpux,
|
||||
/{usr/,}bin/{c,k,tc,z}sh rpux,
|
||||
|
||||
# Fake shells to politely refuse a login
|
||||
#/{usr/,}sbin/nologin rpux,
|
||||
|
||||
/etc/environment r,
|
||||
|
||||
@{PROC}/1/limits r,
|
||||
owner @{PROC}/@{pid}/loginuid r,
|
||||
|
||||
/etc/default/locale r,
|
||||
/etc/security/limits.d/ r,
|
||||
|
||||
/etc/shells r,
|
||||
|
||||
# For pam_securetty
|
||||
@{PROC}/cmdline r,
|
||||
@{sys}/devices/virtual/tty/console/active r,
|
||||
|
||||
include if exists <local/su>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue