With the fix the ptp4l@ systemd unit still has issues sending messages
back to the pmc socket.

The reason is that the systemd unit creates a restricted namespace and
it becomes a disconnected path such that the rule won't apply and ptp4l
is denied again.

sudo journalctl -k --since "-1 h" --no-pager | grep 'apparmor="DENIED"' | grep 
pmc | tail -1
sudo strace -f -p "$(systemctl show -p MainPID --value ptp4l@<your interface>)" 
-e trace=recvfrom,recvmsg,sendto,sendmsg

A possible fix while keeping the namespace rules is to allow disconnected paths:
- profile ptp4l /usr/sbin/ptp4l {
+ profile ptp4l /usr/sbin/ptp4l flags=(attach_disconnected) {

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2169218

Title:
  ptp4l AppArmor profile blocks system clock adjustment and pmc replies

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linuxptp/+bug/2169218/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to