ntp doesn't unload its apparmor profile on purge
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apparmor (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
ntp (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
openntpd (Debian) |
New
|
Unknown
|
Bug Description
Steps to reproduce:
1) install ntp
apt install ntp
2) confirm it has loaded its AA profile
aa-status | grep ntpd
3) purge ntp
apt purge ntp
4) the profile is left behind but shouldn't
aa-status | grep ntpd
Additional info:
This was found by first install ntp then changing my mind and deciding to go with OpenNTPD.
FYI, just installing openntpd while ntp is still there works because openntpd has a kludge
to unload ntpd's profile but that only works if the ntp package wasn't purged before.
/var/lib/
if [ -f /etc/apparmor.
apparmor_
fi
Since a purge deletes /etc/apparmor.
In any case, having implementation B include workaround for implementation A not cleaning up
after itself seems wrong and the issue should be fixed at the source IMHO.
# lsb_release -rd
Description: Ubuntu 16.04.2 LTS
Release: 16.04
# apt-cache policy ntp
ntp:
Installed: 1:4.2.8p4+
Candidate: 1:4.2.8p4+
Version table:
*** 1:4.2.8p4+
500 http://
100 /var/lib/
1:
500 http://
1:
500 http://
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: ntp (not installed)
ProcVersionSign
Uname: Linux 4.4.0-78-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Tue May 9 15:48:42 2017
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SourcePackage: ntp
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in openntpd (Debian): | |
status: | Unknown → New |
Hi Simon,
thank you for your report - it indeed should unload the profile.
I wonder thou as it uses: name=usr. sbin.ntpd -pntp
dh_apparmor --profile-
Which I thought should handle load and unload in the generated sections.
Commenting on that once I prepped my text ...