Bug 227056 - sysutils/sec: Can we allow sec_user to update pidfile?
Summary: sysutils/sec: Can we allow sec_user to update pidfile?
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Craig Leres
Depends on:
Reported: 2018-03-28 22:14 UTC by Craig Leres
Modified: 2018-04-14 21:16 UTC (History)
1 user (show)

See Also:
ecu: maintainer-feedback+

patch (1.29 KB, patch)
2018-04-14 20:27 UTC, Craig Leres
leres: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!