profiles: dhclient: allow setting task comm name

dhclient wants to set its thread names to functional names for
introspection purposes. Eg.

$ pstree -at 3395
dhclient ens3
  ├─{isc-socket}
  ├─{isc-timer}
  └─{isc-worker0000}

When denied this can result in dhclient breaking and failing to obtain
IPv4 addresses.

Fixes: https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1918410
Signed-off-by: John Johansen <john.johansen@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>
(cherry picked from commit c734839551)
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
John Johansen 2021-03-29 15:34:43 -07:00
parent b63dfedb0b
commit 9e4614b28e

View file

@ -43,6 +43,11 @@ profile dhclient /{usr/,}sbin/dhclient {
@{PROC}/interrupts r,
@{PROC}/@{pid}/net/dev r,
@{PROC}/rtc r,
# dhcliet wants to update its threads with functional names
# see lp1918410
owner @{PROC}/@{pid}/task/[0-9]*/comm rw,
# following rule shouldn't work, self is a symlink
@{PROC}/self/status r,
/{usr/,}sbin/arp mrix,