For reference,

https://src.fedoraproject.org/rpms/gpm/blob/master/f/gpm.service

https://git.archlinux.org/svntogit/packages.git/tree/trunk/gpm.service?h=packages/gpm

These should serve as a base (and it would be nice if someone
upstreamed one of these, to unify distros around a single one
and prepare for further improvements).

Please also note that the gpm init script used in Debian[1] is not
the one shipped by upstream[2]. The Debian version contains a home-grown
config file parsing feature. This should rather be implemented by
the daemon itself (if needed, or the config file deprecated).

The gpm daemon is one of those long-standing things which likely
contains alot of legacy code. It would be nice if the attack surface
could be limited by applying some of the systemd security features
to the service as a future further improvement. eg. Protect*,
Private*, *Privileges, *Capabilit*, etc. See:
https://www.freedesktop.org/software/systemd/man/systemd.exec.html

Regards,
Andreas Henriksson

[1]: https://anonscm.debian.org/git/collab-maint/gpm.git/tree/debian/gpm.init
[2]: https://github.com/telmich/gpm/blob/master/contrib/init/gpm.init

Reply via email to