gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] PPS and privilege-dropping


From: Gary E. Miller
Subject: Re: [gpsd-dev] PPS and privilege-dropping
Date: Thu, 17 Oct 2013 14:55:30 -0700

Yo Harlan!

On Thu, 17 Oct 2013 20:11:08 +0000
Harlan Stenn <address@hidden> wrote:

> "Eric S. Raymond" writes:
> > 
> > The JSON PPS messages were designed with a specific purpose in mind
> > - to track the skew between NTP-adjusyed system clock and GPS+PPS
> > time so Dave Taht and I can benchmark NTP.
> 
> And there was much rejoicing.

Can you tell me what you think it is doing, and where in the gpsd
code this is generated.  I see nothing like described anywhere near
the timekeeping code in gpsd.

> >> ALL ntpd prefers root for initialization.  There is serious loss of
> >> functionality when not initialized as root.
> > 
> > The HOWTO should explain this.  There's a reference to it in a
> > comment in ntpshm.c, but it didn't tell me enough to understand
> > *why*.
> 
> I'm not sure what is meant here.  Some of the things ntpd needs root
> for include opening port 123, sometimes updating the time, and there
> may also be an issue for shmget() units 0 and 1 (which are 0600
> perms, while units 2 and 3 are 0666).  There may be other cases.

gpsd needs root for several things during timekeeping initialization:
        to give itself a high priority for minimal latency timekeeping.
        to access KPPS
        to access PPS on the GPS port if the port permissions are odd
        to select and access/create the proper ntpd shmget() units
        to select and access/create the proper chronyd socket file

At the moment proper timekeeping initialization can only happen when
gpsd is just started (ATM that is slightly broken).  If a device
is hotplugged into a runing gpsd initialization of KPPS is not
possible, the PPS device may not be accesible and the SHMs and sockets
will be different or unavailable.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]