Bug 198678 - devel/p4web can't take custom p4web_user
Summary: devel/p4web can't take custom p4web_user
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-18 02:49 UTC by Devin Teske
Modified: 2018-05-14 02:37 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (gordon)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Teske freebsd_committer freebsd_triage 2015-03-18 02:49:46 UTC
Trying to make devel/p4web run on port 80. The startup script (/usr/local/etc/rc.d/p4web) has a hard-coded p4web_user which causes the process to always be started as non-privileged user "p4admin" (which results in the inability to bind to 0.0.0.0:80, permission denied).

It would be nice if one could do:

sysrc p4web_{enable=YES,listen=80,user=root,args="-U p4admin"}

Causing the following to be configured in rc.conf(5):

p4web_enable="YES"
p4web_listen="80"
p4web_user="root" # <-- not supported by current rc.d script
p4web_args="-U p4admin"

The net effect is that the p4web process will initially be run as root -- allowing it to bind to 0.0.0.0:80 -- but the addition of the "-U p4admin" args will cause p4web to then become the p4admin user after performing the initial listen.

Currently there seems to be no way to change the user that p4web is run as.

Since p4d has the same problem (hard-coded to use p4admin), it is not deemed a good idea to simply make p4admin part of the wheel group (p4d does not need to bind to a port below 1024 and thus doesn't need the elevated privileges).
Comment 1 Walter Schwarzenfeld 2018-01-12 04:30:32 UTC
No maintainer feedback, nearly 3 years!
Comment 2 Gordon Tetlow freebsd_committer freebsd_triage 2018-05-14 02:37:15 UTC
With Perforce no longer supporting FreeBSD as a server platform, devel/p4web (among others) has been removed from the tree.