2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 13:58:22 +00:00

Add profile names to all profiles with {bin,sbin} attachment

Also adjust the signal rules in the dovecot-common and apache2-common
abstractions to match the profile names, and to really do that
(peer=...{bin,sbin}... didn't work, the correct syntax would have been
peer=...\{bin,sbin\}...)

This fixes the regression introduced by !149 / commit
4200932d8f
This commit is contained in:
Christian Boltz
2018-10-15 20:57:33 +02:00
parent 4a2dad336a
commit b77116e6af
14 changed files with 16 additions and 16 deletions

View File

@@ -7,9 +7,9 @@
# Allow unconfined processes to send us signals by default # Allow unconfined processes to send us signals by default
signal (receive) peer=unconfined, signal (receive) peer=unconfined,
# Allow apache to send us signals by default # Allow apache to send us signals by default
signal (receive) peer=/usr/{bin,sbin}/apache2, signal (receive) peer=apache2,
# Allow other hats to signal by default # Allow other hats to signal by default
signal peer=/usr/{bin,sbin}/apache2//*, signal peer=apache2//*,
# Allow us to signal ourselves # Allow us to signal ourselves
signal peer=@{profile_name}, signal peer=@{profile_name},

View File

@@ -14,6 +14,6 @@
deny capability block_suspend, deny capability block_suspend,
# dovecot's master can send us signals # dovecot's master can send us signals
signal receive peer=/usr/{bin,sbin}/dovecot, signal receive peer=dovecot,
/{var/,}run/dovecot/config rw, /{var/,}run/dovecot/config rw,

View File

@@ -29,7 +29,7 @@
/run/dovecot/auth-userdb rw, /run/dovecot/auth-userdb rw,
/usr/bin/doveconf mrix, /usr/bin/doveconf mrix,
/usr/lib/dovecot/dovecot-lda mrix, /usr/lib/dovecot/dovecot-lda mrix,
/usr/{bin,sbin}/sendmail Cx, /usr/{bin,sbin}/sendmail Cx -> sendmail,
/usr/share/dovecot/protocols.d/ r, /usr/share/dovecot/protocols.d/ r,
/usr/share/dovecot/protocols.d/** r, /usr/share/dovecot/protocols.d/** r,
@@ -37,7 +37,7 @@
#include <local/usr.lib.dovecot.dovecot-lda> #include <local/usr.lib.dovecot.dovecot-lda>
profile /usr/{bin,sbin}/sendmail flags=(attach_disconnected) { profile sendmail /usr/{bin,sbin}/sendmail flags=(attach_disconnected) {
# this profile is based on the usr.sbin.sendmail profile in extras # this profile is based on the usr.sbin.sendmail profile in extras
# and should support both postfix' and sendmail's sendmail binary # and should support both postfix' and sendmail's sendmail binary

View File

@@ -1,7 +1,7 @@
# Author: Marc Deslauriers <marc.deslauriers@ubuntu.com> # Author: Marc Deslauriers <marc.deslauriers@ubuntu.com>
#include <tunables/global> #include <tunables/global>
/usr/{bin,sbin}/apache2 flags=(attach_disconnected) { profile apache2 /usr/{bin,sbin}/apache2 flags=(attach_disconnected) {
# This profile is completely permissive. # This profile is completely permissive.
# It is designed to target specific applications using mod_apparmor, # It is designed to target specific applications using mod_apparmor,

View File

@@ -1,5 +1,5 @@
#include <tunables/global> #include <tunables/global>
/usr/{bin,sbin}/avahi-daemon { profile avahi-daemon /usr/{bin,sbin}/avahi-daemon {
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/consoles> #include <abstractions/consoles>
#include <abstractions/dbus> #include <abstractions/dbus>

View File

@@ -12,7 +12,7 @@
#include <tunables/global> #include <tunables/global>
/usr/{bin,sbin}/dovecot flags=(attach_disconnected) { profile dovecot /usr/{bin,sbin}/dovecot flags=(attach_disconnected) {
#include <abstractions/authentication> #include <abstractions/authentication>
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/dovecot-common> #include <abstractions/dovecot-common>

View File

@@ -11,7 +11,7 @@
#include <tunables/global> #include <tunables/global>
/usr/{bin,sbin}/identd { profile identd /usr/{bin,sbin}/identd {
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/nameservice> #include <abstractions/nameservice>
capability net_bind_service, capability net_bind_service,

View File

@@ -11,7 +11,7 @@
#include <tunables/global> #include <tunables/global>
/usr/{bin,sbin}/mdnsd { profile mdnsd /usr/{bin,sbin}/mdnsd {
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/consoles> #include <abstractions/consoles>
#include <abstractions/nameservice> #include <abstractions/nameservice>

View File

@@ -1,6 +1,6 @@
#include <tunables/global> #include <tunables/global>
/usr/{bin,sbin}/nmbd { profile nmbd /usr/{bin,sbin}/nmbd {
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/nameservice> #include <abstractions/nameservice>
#include <abstractions/samba> #include <abstractions/samba>

View File

@@ -10,7 +10,7 @@
# ------------------------------------------------------------------ # ------------------------------------------------------------------
#include <tunables/global> #include <tunables/global>
/usr/{bin,sbin}/nscd { profile nscd /usr/{bin,sbin}/nscd {
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/consoles> #include <abstractions/consoles>
#include <abstractions/nameservice> #include <abstractions/nameservice>

View File

@@ -11,7 +11,7 @@
#include <tunables/global> #include <tunables/global>
#include <tunables/ntpd> #include <tunables/ntpd>
/usr/{bin,sbin}/{,open}ntpd flags=(attach_disconnected) { profile ntpd /usr/{bin,sbin}/{,open}ntpd flags=(attach_disconnected) {
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/nameservice> #include <abstractions/nameservice>
#include <abstractions/openssl> #include <abstractions/openssl>

View File

@@ -1,6 +1,6 @@
#include <tunables/global> #include <tunables/global>
/usr/{bin,sbin}/smbd { profile smbd /usr/{bin,sbin}/smbd {
#include <abstractions/authentication> #include <abstractions/authentication>
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/consoles> #include <abstractions/consoles>

View File

@@ -1,7 +1,7 @@
# Last Modified: Tue Jan 3 00:17:40 2012 # Last Modified: Tue Jan 3 00:17:40 2012
#include <tunables/global> #include <tunables/global>
/usr/{bin,sbin}/smbldap-useradd { profile smbldap-useradd /usr/{bin,sbin}/smbldap-useradd {
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/bash> #include <abstractions/bash>
#include <abstractions/nameservice> #include <abstractions/nameservice>

View File

@@ -1,6 +1,6 @@
#include <tunables/global> #include <tunables/global>
/usr/{bin,sbin}/winbindd { profile winbindd /usr/{bin,sbin}/winbindd {
#include <abstractions/base> #include <abstractions/base>
#include <abstractions/nameservice> #include <abstractions/nameservice>
#include <abstractions/samba> #include <abstractions/samba>