Files
packages/utils
Michael Pfeifroth edef6a4926 gpsd: run as dedicated 'gpsd' system user
Create a dedicated 'gpsd' system user at package-install time (via
USERID) and pin gpsd's built-in privilege-separation identity to it
via the SConstruct 'gpsd_user' option.

Background: gpsd needs to start as root to open the underlying tty /
serial device but then internally setuid()s to a configured
unprivileged identity for the rest of its lifetime -- a built-in
privilege-separation feature of the daemon.

The current package leaves 'gpsd_user' at scons' default 'nobody'.
Sharing 'nobody' across daemons is a hardening anti-pattern:
a compromise of any one 'nobody'-owned process can trivially
interfere with any other, and audit trails become ambiguous.

Group choice: gpsd_group is a device-access knob rather than an
identity knob -- once gpsd has setuid()d away from root it still
needs to open() tty / serial nodes, which OpenWrt exposes as
root:dialout mode 0660 (see procd hotplug.json and base-files
/etc/group).  What actually keeps that access working post-drop is
the setgid() target that gpsd_group selects: gpsd calls
setgroups(0, NULL) immediately before dropping privileges, so any
supplementary groups on the target user are discarded and cannot
carry the permission.

scons' gpsd_group default is not 'nobody' but 'dialout' (uucp on
Gentoo build hosts), so on OpenWrt buildbots the daemon already
lands in 'dialout' today.  Pin gpsd_group=dialout explicitly so the
resulting binary no longer depends on the builder's /etc/gentoo-release:
a Gentoo builder would otherwise bake in 'uucp', a group base-files
does not ship, and gpsd's getgrnam() fallback silently keeps root's
gid in that case.

USERID's third field ('dialout=20') still adds the gpsd user to the
dialout group in /etc/group.  This does not affect the running
daemon (setgroups() strips it) but matches Debian's gpsd packaging
and lets an operator run gpsdctl / gpsmon as 'gpsd' by hand against
device nodes.  GID 20 is the value already frozen into base-files.

Giving gpsd its own primary user:

  * confines a hypothetical gpsd RCE (there have been NMEA / UBX
    parsing bugs historically) to files owned by 'gpsd' rather than
    to the shared 'nobody' identity;
  * matches the long-standing Debian gpsd packaging convention
    (adduser --system gpsd, member of dialout);
  * is a no-op for correctly-configured installations that never
    referenced 'nobody' as an intentional identity.

No numeric UID is pinned for the primary 'gpsd' user -- dynamic
assignment via USERID is sufficient here since no cross-distro
NFS/sudoers-style muscle memory depends on a specific number.

Bump PKG_RELEASE.

Signed-off-by: Michael Pfeifroth <micpf@westermo.com>
2026-08-07 13:47:42 +03:00
..
…
2026-03-15 09:15:43 +02:00
2026-06-24 13:39:16 +08:00
2026-07-29 20:33:35 +03:00
…
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-06-20 18:48:35 +02:00
2026-04-03 22:24:03 +03:00
2026-02-15 10:33:55 +02:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-06-23 22:50:16 +08:00
2026-06-10 21:28:44 +01:00
2026-05-08 22:28:27 +02:00
2026-08-04 07:33:19 +02:00
2026-07-06 20:25:02 -06:00
2026-05-15 13:45:40 +01:00
2026-05-15 13:45:40 +01:00
2026-06-02 00:33:07 +01:00
2026-07-18 11:46:26 +03:00
2026-05-12 09:09:25 +03:00
2026-06-23 22:48:58 +08:00
2026-08-04 02:33:26 +01:00
…
2026-05-08 22:28:27 +02:00
2026-06-11 11:37:29 +02:00
2026-07-18 11:46:26 +03:00
2026-07-18 11:46:26 +03:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-07-29 22:48:02 +03:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
…
2026-05-10 11:32:19 +03:00
2026-07-06 10:01:00 +02:00
2026-06-11 08:23:55 +02:00
2026-06-01 08:10:43 +03:00
2026-01-04 13:26:24 +02:00
2026-05-10 11:32:19 +03:00
2026-07-31 22:17:17 +02:00
2026-07-09 16:52:14 +03:00
2026-05-09 19:11:39 +03:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-05-20 00:40:22 +01:00
…
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-06-23 16:40:19 +03:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-07-14 15:48:20 +02:00
2026-07-31 09:41:18 +03:00
2026-03-18 07:37:50 +01:00
…
…
2026-07-31 12:52:31 +03:00
…
2026-05-08 22:28:27 +02:00
…
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-07-31 12:52:31 +03:00
…
2026-07-07 20:29:49 +02:00
2026-05-20 13:20:42 +01:00
2026-06-21 17:25:02 +02:00
2026-05-17 08:55:58 +02:00
…
…
2026-03-15 09:12:26 +02:00
2026-05-08 22:28:27 +02:00
2026-05-06 21:05:02 +03:00
2026-05-20 21:27:20 +03:00
2026-08-03 18:10:36 +03:00
…
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-05-12 16:18:56 +01:00
2026-05-03 20:59:28 +03:00
2026-07-11 23:04:15 +08:00
2026-05-08 22:28:27 +02:00
…
2026-07-10 20:57:53 +02:00
2026-07-20 08:17:44 +02:00
2026-07-30 14:21:19 +03:00
2026-01-09 10:53:29 +01:00
2026-05-08 22:28:27 +02:00
2026-05-19 08:50:55 +03:00
2026-05-08 22:28:27 +02:00
2026-06-10 00:07:48 +02:00
2026-06-26 16:39:50 +08:00
2026-07-18 11:46:26 +03:00
2026-05-03 08:14:01 +02:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-05-10 11:32:19 +03:00
…
…
2026-07-16 15:00:54 +02:00
…
…
2026-07-21 05:58:05 +02:00
…
2026-07-06 22:49:03 +02:00
2026-02-03 12:12:44 +02:00
…
…
2026-05-08 22:28:27 +02:00
2026-03-18 07:33:03 +01:00
2026-07-25 23:53:57 +01:00
2026-05-22 16:28:17 +03:00
…
2026-05-06 21:05:02 +03:00
2026-07-23 07:28:58 +02:00
2026-05-08 22:28:27 +02:00
2026-05-08 22:28:27 +02:00
2026-07-15 08:30:36 +02:00