apparmor: Use abstractions/nameservice to deal with symlinked resolv.conf
While abstractions/nameservice appeared too broad and overkill for our simple need (read-only resolv.conf access), it properly deals with symlinked resolv.conf files generated by systemd-resolved, NetworkManager or suchlike. If we just grant read-only access to /etc/resolv.conf, we'll fail to read nameserver information in rather common configurations, because AppArmor won't follow the symlink. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
a7e4bfb857
commit
6d3e426d2f
1 changed files with 1 additions and 2 deletions
|
@ -15,8 +15,7 @@
|
||||||
|
|
||||||
include <abstractions/base>
|
include <abstractions/base>
|
||||||
|
|
||||||
# Alternatively: include <abstractions/nameservice>
|
include <abstractions/nameservice> # get_dns(), conf.c
|
||||||
@{etc_ro}/resolv.conf r, # get_dns(), conf.c
|
|
||||||
|
|
||||||
capability net_bind_service, # isolation.c, conf.c
|
capability net_bind_service, # isolation.c, conf.c
|
||||||
capability setuid,
|
capability setuid,
|
||||||
|
|
Loading…
Reference in a new issue