Bug 266106 - dns/inadyn : fix for pidfile creation on transient /var/run configuration
Summary: dns/inadyn : fix for pidfile creation on transient /var/run configuration
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Oleksii Samorukov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-30 03:08 UTC by Michael Proto
Modified: 2023-06-06 06:04 UTC (History)
1 user (show)

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


Attachments
startup script patch for systems with transient /var/run mount (152 bytes, patch)
2022-08-30 03:08 UTC, Michael Proto
no flags Details | Diff
fixed patch (433 bytes, patch)
2022-08-30 03:10 UTC, Michael Proto
no flags Details | Diff
fixed patch r2 (452 bytes, patch)
2022-08-31 23:01 UTC, Michael Proto
no flags Details | Diff
fixed patch r3 (454 bytes, patch)
2023-02-21 01:42 UTC, Michael Proto
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Proto 2022-08-30 03:08:12 UTC
Created attachment 236236 [details]
startup script patch for systems with transient /var/run mount

Hi inadyn maintainer,

I've noticed that dns/inadyn tries to write a pidfile in /var/run/inadyn as its own unprivileged UID, which doesn't work for systems with a transient /var/run mount like mine. I've patched /usr/local/etc/rc.d/inadyn to create this and set permissions if it doesn't exist at startup which resolves my issue, submitting here for consideration.
Comment 1 Michael Proto 2022-08-30 03:10:33 UTC
Created attachment 236237 [details]
fixed patch
Comment 2 Michael Proto 2022-08-31 23:01:17 UTC
Created attachment 236275 [details]
fixed patch r2

Updated patch to reference the inadyn_pidfile location instead of a fixed path
Comment 3 Michael Proto 2023-02-21 01:27:38 UTC
Just pinging this bug to see if the patch could be reviewed.
Comment 4 Michael Proto 2023-02-21 01:42:35 UTC
Created attachment 240296 [details]
fixed patch r3

adds quote safety to ${piddir} and fixes null-output for id check
Comment 5 Oleksii Samorukov freebsd_committer freebsd_triage 2023-06-05 19:21:59 UTC
Hi, patch looks good, sorry for the late reply. I will apply it in the meantime
Comment 6 Michael Proto 2023-06-05 21:37:20 UTC
Sounds great, than you for your consideration.
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-06-06 06:04:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=86bb83ce8acd6c460fa3f708fd7ac95c6ad7f000

commit 86bb83ce8acd6c460fa3f708fd7ac95c6ad7f000
Author:     Oleksii Samorukov <samm@FreeBSD.org>
AuthorDate: 2023-06-06 06:03:07 +0000
Commit:     Oleksii Samorukov <samm@FreeBSD.org>
CommitDate: 2023-06-06 06:04:10 +0000

    dns/inadyn: fix for pidfile creation on transient /var/run configuration

    PR: 266106

 dns/inadyn/Makefile        | 1 +
 dns/inadyn/files/inadyn.in | 5 +++++
 2 files changed, 6 insertions(+)
Comment 8 Oleksii Samorukov freebsd_committer freebsd_triage 2023-06-06 06:04:51 UTC
fixed, thanks