Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 836328 - net-misc/minidlna-1.3.0-r2 (possibly other versions): minidlnad crashes when started by init
Summary: net-misc/minidlna-1.3.0-r2 (possibly other versions): minidlnad crashes when...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-03-28 16:13 UTC by Phil Stracchino (Unix Ronin)
Modified: 2022-03-29 16:27 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to /etc/init.d/minidlna to fix crash on startup (minidlna-init-patch,453 bytes, patch)
2022-03-28 16:14 UTC, Phil Stracchino (Unix Ronin)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Stracchino (Unix Ronin) 2022-03-28 16:13:50 UTC
net-misc/minidlna-1.3.0-r2 consistently crashes on start if started by OpenRC (and possibly by other startup methods), but starts correctly if launched manually.

The problem here appears to lie in the start_stop_daemon invocation.  It seems the user and group are not being correctly passed to minidlnad.  Changing /etc/init.d/minidlna from:

command_args="-P $pidfile -f $CONFIG"
start_stop_daemon_args="--user ${M_USER}:${M_GROUP}"

to:

command_args="-P $pidfile -f $CONFIG -u ${M_USER} -g ${M_GROUP}"
start_stop_daemon_args=''

appears, in my case at least, to resolve the problem.

Patch attached.



Reproducible: Always
Comment 1 Phil Stracchino (Unix Ronin) 2022-03-28 16:14:54 UTC
Created attachment 768080 [details, diff]
Patch to /etc/init.d/minidlna to fix crash on startup