mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
abstraction: add nameservice-strict.
Imported from gitlab.com/roddhjav/apparmor.d
This commit is contained in:
parent
a522e11129
commit
1a8d8f3695
1 changed files with 53 additions and 0 deletions
53
profiles/apparmor.d/abstractions/nameservice-strict
Normal file
53
profiles/apparmor.d/abstractions/nameservice-strict
Normal file
|
@ -0,0 +1,53 @@
|
|||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2019-2022 Mikhail Morfikov
|
||||
# Copyright (C) 2021-2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
# Many programs wish to perform nameservice-like operations, such as looking up
|
||||
# users by name or id, groups by name or id, hosts by name or IP, etc.
|
||||
|
||||
@{etc_ro}/default/nss r,
|
||||
@{etc_ro}/gai.conf r,
|
||||
@{etc_ro}/group r,
|
||||
@{etc_ro}/host.conf r,
|
||||
@{etc_ro}/hosts r,
|
||||
@{etc_ro}/nsswitch.conf r,
|
||||
@{etc_ro}/passwd r,
|
||||
@{etc_ro}/protocols r,
|
||||
@{etc_ro}/resolv.conf r,
|
||||
@{etc_ro}/services r,
|
||||
|
||||
# On systems with authselect installed, /etc/nsswitch.conf is a symlink to /etc/authselect/nsswitch.conf
|
||||
@{etc_ro}/authselect/nsswitch.conf r,
|
||||
|
||||
# Alternative location for group & passwd files
|
||||
/var/lib/extrausers/group r,
|
||||
/var/lib/extrausers/passwd r,
|
||||
/var/lib/nscd/group r,
|
||||
/var/lib/nscd/passwd r,
|
||||
|
||||
@{run}/nscd/db* r,
|
||||
@{run}/resolvconf/resolv.conf r,
|
||||
@{run}/systemd/resolve/resolv.conf r,
|
||||
@{run}/systemd/resolve/stub-resolv.conf r,
|
||||
|
||||
# NSS records from systemd-userdbd.service
|
||||
#
|
||||
# Allow User/Group lookups via common VarLink socket APIs. Applications need
|
||||
# to either consult all of them or the io.systemd.Multiplexer frontend.
|
||||
#
|
||||
# https://systemd.io/USER_GROUP_API/
|
||||
# https://systemd.io/USER_RECORD/
|
||||
# https://www.freedesktop.org/software/systemd/man/nss-systemd.html
|
||||
#
|
||||
@{run}/systemd/userdb/ r,
|
||||
@{run}/systemd/userdb/io.systemd.DynamicUser rw, # systemd-exec users
|
||||
@{run}/systemd/userdb/io.systemd.Home rw, # systemd-home dirs
|
||||
@{run}/systemd/userdb/io.systemd.Machine rw, # systemd-machined
|
||||
@{run}/systemd/userdb/io.systemd.Multiplexer rw,
|
||||
@{run}/systemd/userdb/io.systemd.NameServiceSwitch rw, # UNIX/glibc NSS
|
||||
@{PROC}/sys/kernel/random/boot_id r,
|
||||
|
||||
include if exists <abstractions/nameservice-strict.d>
|
||||
|
||||
# vim:syntax=apparmor
|
Loading…
Add table
Reference in a new issue