mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 14:25:52 +00:00
Merge abstraction: add nameservice-strict.
As I have read multiple MR mentioning the `nameservice-strict`. Therefore, I thought it would make sense to directly import it here. To give some context, this abstraction is probably the most commonly included abstraction (after `base`). In `apparmor.d`, it is used by over 700 profiles (only counting direct import). Therefore, adding new rules can have an important impact over a lot of profiles. Note: the abstraction is a direct import from https://gitlab.com/roddhjav/apparmor.d. The license is the same, I obviously kept Morfikov copyright line. However, I am not sure either or not the SPDX identifier can be used here. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1368 Approved-by: Georgia Garcia <georgia.garcia@canonical.com> Approved-by: Christian Boltz <apparmor@cboltz.de> Approved-by: Ryan Lee <rlee287@yahoo.com> Merged-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
40
profiles/apparmor.d/abstractions/nameservice-strict
Normal file
40
profiles/apparmor.d/abstractions/nameservice-strict
Normal file
@@ -0,0 +1,40 @@
|
||||
# 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.
|
||||
|
||||
abi <abi/4.0>,
|
||||
|
||||
include <abstractions/nss-systemd>
|
||||
|
||||
@{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,
|
||||
|
||||
include if exists <abstractions/nameservice-strict.d>
|
||||
|
||||
# vim:syntax=apparmor
|
Reference in New Issue
Block a user