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
---
contrib/apparmor/abstractions/passt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/contrib/apparmor/abstractions/passt b/contrib/apparmor/abstractions/passt
index 6e2a6f3..a16eb6e 100644
--- a/contrib/apparmor/abstractions/passt
+++ b/contrib/apparmor/abstractions/passt
@@ -15,8 +15,7 @@
include
- # Alternatively: include
- @{etc_ro}/resolv.conf r, # get_dns(), conf.c
+ include # get_dns(), conf.c
capability net_bind_service, # isolation.c, conf.c
capability setuid,
--
2.39.2