Re: [Linuxptp-users] Support for dropping root privileges: follow up
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
|
From: PATRICK K. <pat...@ra...> - 2022-04-04 17:25:45
|
On Sun, Apr 3, 2022 at 1:13 PM Martin Pecka <pec...@fe...> wrote: > > Hi Patrick, > > The use case is: we have a bunch of slave clocks that we would like > to monitor by running pmc on each (+ snmp eventually). If this feature > would allow running pmc without sudo, it would provide an elegant > solution. > > I proposed to linuxptp-devel on 29 March patch ([PATCH] UDS: added option to set file mode for the created socket.). This patch would allow you to explicitly set the file mode of the created socket. That would be an alternative (and easier) solution than the patch implementing dropping root privileges. > > There is, however, ongoing discussion about the implementation on linuxptp-users (Config section for /var/log/ptp4lro creates an additional port). We haven't yet settled on the ideal implementation of the feature. > > Martin Hello Martin, Your patch works fine for me given a non default interface `-i` to pmc, since my user doesn't have write permission in `/vav/run`. This looks simple indeed. Though, I'm not sure about the rationale for exposing 2 sockets. Is the intention to accommodate both trusted (GET+SET) and untrusted (GET) applications? Anyways, I'll keep an eye on the upcoming development. Thanks, Patrick |