gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] RFC2783 vs TIOCMIWAIT, PPS on NetBSD


From: Andy Walls
Subject: Re: [gpsd-dev] RFC2783 vs TIOCMIWAIT, PPS on NetBSD
Date: Thu, 31 Oct 2013 21:26:40 -0400
User-agent: K-9 Mail for Android

On linux all the RFC2783 time_pps_*() functions funnel through here:

http://lxr.free-electrons.com/source/drivers/pps/pps.c#L67

To call time_pps_setparams() to set things up (like which edges you want to capture) requires root, or the POSIX capability CAP_SYS_TIME to be retained after you drop root.

To call time_pps_fetch(), the underlying PPS_FETCH ioctl() call does not seem to impose additional permission checks for admin privledges or capabilities.

I don't know how distributions normally set the permissions on /dev/pps? nodes though.

Regards,
Andy

"Eric S. Raymond" <address@hidden> wrote:
Greg Troxel <address@hidden>:
So my current belief is that RFC2783 should be entirely adeequate for
gpsd to read pps, and I don't understand why TIOCMIWAIT is really
needed.

This creates several TODO items:

add pps support to NetBSD ucom(4), so the GR601-W will work

enable gpsd to find sys/timepps.h on NetBSD (sys/types.h is needed
first, at least)

enable gpsd to do pps with RFC2783 and without TIOCMIWAIT

This seems like a good long-term direction. My only concern is that
it sounds as though gpsd might have to keep root privileges through
its lifetime to use this API. That would be undesirable.

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
reply via email to

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