I think the @pkgpath is needed for the quirks rename to work. Test with pkg_add -u with PKG_PATH pointed at a dir with the packages to be sure. (If it's not meant to be a replacement then the quirks rename isn't wanted either)

pexp - if we match process names in rc scripts for any process which uses setproctitle then an unprivileged user can run a process with the same string. Doesn't seem a big risk; someone can go out of their way to receive signals meant for the daemon e.g. gotd, but it doesn't stop gotd receiving them too. (pexp match is on the full name, i.e. this only matches ^gotd: parent$).

--
 Sent from a phone, apologies for poor formatting.

On 17 January 2023 14:03:13 Omar Polo <o...@omarpolo.com> wrote:

On 2023/01/17 14:36:53 +0100, Stefan Sperling <s...@stsp.name> wrote:
--- /dev/null
+++ devel/got/pkg/gotd.rc
@@ -0,0 +1,15 @@
+#!/bin/ksh
+
+daemon="${TRUEPREFIX}/sbin/gotd"
+
+. /etc/rc.d/rc.subr
+
+pexp="gotd: parent"

this seems a bit weak, but at the moment I don't think we can do
better:

% pgrep -lf gotd
46576 gotd: listen
4424 gotd: parent

(actually don't know if it's really 'weak', usually pexp matches the
full path to the executable, this pexp allow for any user on the
machine to run a process matching it.)

[...]
--- devel/quirks/files/Quirks.pm
+++ devel/quirks/files/Quirks.pm
@@ -1778,6 +1778,7 @@ setup_obsolete_reason(
6 => 'caribou',
5 => 'riak',
15 => 'rmilter',
+ 3 => 'gotweb',
);

# though it's not yet used, these should be pkgnames, so that eventually
@@ -1794,6 +1795,7 @@ my $obsolete_suggestion = {
'keepassx' => 'keepassxc',
'lives' => [qw(kdenlive shotcut)],
'pdfshuffler' => 'pdfarranger',
+ 'gotweb' => 'gotwebd',
};

agreed doing it like this and not with a @pkgpath on gotwebd since
it's quite different from gotweb (requires different httpd stanza and
configuration file.)

Reply via email to