[Top][All Lists]

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

Re: [gpsd-dev] test failures with shmget

From: Gary E. Miller
Subject: Re: [gpsd-dev] test failures with shmget
Date: Tue, 3 Feb 2015 23:44:16 -0800

Yo Eric!

On Wed, 4 Feb 2015 00:50:19 -0500
"Eric S. Raymond" <address@hidden> wrote:

> Gary E. Miller <address@hidden>:
> > > So I boosted the number of NTP segments allocated to twice the max
> > > number of devices, which by default equals 8.
> > 
> > Yes.  That is good.  However what the owner:group and file
> > permissions is still a matter of discussion within the ntpd
> > commmunity.  So nothing settled yet.
> >  
> > > This is a recent change and can easily be rolled back if I have
> > > misunderstood thwe interface.
> > 
> > Nope, what you have is good, just expect it to change a bit.  Given
> > how fast ntpd moves do not hold your breath.
> I wouldn't be worried in any case.  The change under discussion would
> be easy even for me, and I don't know that interface as well as you
> do.
> As a separate matter, the code is not in my opinion ideally factored.
> I would prefer an implementation with these properties:
> (1) only the preallocated root-permission segment pointers
>     live in the context structure, being put there before 
>     privileges are dropped.
> (2) segment pointers in use are part of the per-device structure,
>     allocated ad-hoc as devices are opened
> (3) the allocation logic gets a root segment if it can, and
>     creates a non-root segment if it must.
The plan I am pushing on ntpd is simpler.  SHMs are created
AFTER root is dropped owned by the gpsd user and the ntpd group.
Mod 660.  Then ntpd which is also running as group ntpd can
access the SHMs.

If ntpd starts first, it creates the SHMs owned by user ntpd and
group ntpd, still perms 660.

Much simpler on gpsd and nptd and all SHM operations can be performed
at any time after dropping root.

> But this is not for before 3.12 is out, and should probably wait until
> the NTP interface re-stabilizes.

Yup, a long way out.

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

Attachment: pgpv90uOGWzzK.pgp
Description: OpenPGP digital signature

reply via email to

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