Bug 293501 - net/fiche: drop privileges to $fiche_user in service
Summary: net/fiche: drop privileges to $fiche_user in service
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: Ryan Steinmetz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-28 13:51 UTC by Benjamin Takacs
Modified: 2026-02-28 14:53 UTC (History)
1 user (show)

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


Attachments
net/fiche: drop privileges to $fiche_user in service (2.82 KB, patch)
2026-02-28 13:51 UTC, Benjamin Takacs
nimaje+fbz: maintainer-approval? (zi)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Takacs 2026-02-28 13:51:04 UTC
Created attachment 268416 [details]
net/fiche: drop privileges to $fiche_user in service

The fiche port creates a fiche user and group, but it doesn't get used. It seems like it was intended to drop privileges in the service instead of running as root. The pidfile has to be created and given to $fiche_user in  fiche_prestart  as only root can write in /var/run/ directly. If the service was used before some files might belong to root, so notify users via an upgrade message, that they have to change owners for them. While here move USERS and GROUPS below the USES-block where it belongs.

QA:
  * portlint: OK (looks fine.)
Comment 1 commit-hook freebsd_committer freebsd_triage 2026-02-28 14:53:54 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5129bd54c165944ae86f4f677e54eb181fc5d446

commit 5129bd54c165944ae86f4f677e54eb181fc5d446
Author:     Ryan Steinmetz <zi@FreeBSD.org>
AuthorDate: 2026-02-28 14:52:34 +0000
Commit:     Ryan Steinmetz <zi@FreeBSD.org>
CommitDate: 2026-02-28 14:52:34 +0000

    net/fiche: Fix dropping privs

    PR:             293501
    Reported by:    Benjamin Takacs <nimaje+fbz@bureaucracy.de>

 net/fiche/Makefile             | 8 ++++----
 net/fiche/files/fiche.in       | 8 +++++++-
 net/fiche/files/pkg-message.in | 9 +++++++++
 3 files changed, 20 insertions(+), 5 deletions(-)