Bug 227056

Summary: sysutils/sec: Can we allow sec_user to update pidfile?
Product: Ports & Packages Reporter: Craig Leres <leres>
Component: Individual Port(s)Assignee: Craig Leres <leres>
Status: Closed FIXED    
Severity: Affects Only Me CC: ecu
Priority: --- Flags: ecu: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
patch leres: maintainer-approval?

Description Craig Leres freebsd_committer 2018-03-28 22:14:23 UTC
We run sec as a non-root user. However the rc.d script does not provide a way to change the pid file. I can think of several ways to solve this:

    - Change pidfile to /var/run/sec/sec.pid
      Optionally chown /var/run/sec to sec_user

    - Optionally add sec_pidfile to rc.conf to override pidfile

If the maintainer could provide feedback on the preferred solution I'm happy to create a patch for approval.
Comment 1 Nicolas Jombart 2018-04-14 18:15:22 UTC

I think the best would be to go to first solution, you can consider it approved.


Comment 2 Craig Leres freebsd_committer 2018-04-14 20:27:39 UTC
Created attachment 192516 [details]

It's better for me if you'd approve the patch.
Comment 3 Nicolas Jombart 2018-04-14 20:57:04 UTC
Comment on attachment 192516 [details]

Approved, thanks!
Comment 4 commit-hook freebsd_committer 2018-04-14 21:16:00 UTC
A commit references this bug:

Author: leres
Date: Sat Apr 14 21:15:24 UTC 2018
New revision: 467341
URL: https://svnweb.freebsd.org/changeset/ports/467341

  Move the pidfile from /var/run/sec.pid to /var/run/sec/sec.pid
  and chown /var/run/sec when sec_user is set.

  PR:		227056
  Reviewed by:	ler (mentor)
  Approved by:	ecu@200ok.org, ler (mentor)
  Differential Revision:	https://reviews.freebsd.org/D15068

Comment 5 Craig Leres freebsd_committer 2018-04-14 21:16:43 UTC
Committed, thanks!