[MacPorts] #24042: mpd runs as root
MacPorts
noreply at macports.org
Sun Dec 5 15:48:24 PST 2010
#24042: mpd runs as root
-----------------------------------+----------------------------------------
Reporter: greg-macports@… | Owner: milosh@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 1.8.2
Keywords: | Port: mpd
-----------------------------------+----------------------------------------
Comment(by greg@…):
Finally getting back to this after many months. Sorry for the delay. (I
got distracted by installing Linux on the Mac in question.)
Anyways: I'm not expert enough with macports yet to simply apply the patch
and rebuild the package, but I tried out the *idea* by hacking the launchd
properties file for mpd to use "su mpd -c ..." as the patch would have it.
That fixes *this* bug, i.e. mpd no longer runs as root. But it leaves an
su process between launchd and mpd, so "launchctl unload -w ..." is unable
to kill mpd. ;-(
So what I've done instead is add
{{{
user "mpd"
}}}
to `/opt/local/etc/mpd.conf`. That is, let launchd run mpd as root, but
make sure that it switches to its own user on startup.
In a nutshell: I think most of the patch uploaded by milosh makes sense;
the mpd port still needs to create an mpd user at installation time. But
I would suggest letting mpd change its own user rather than trying to
trick launchd into calling su to do it. Too complicated.
--
Ticket URL: <https://trac.macports.org/ticket/24042#comment:11>
MacPorts <http://www.macports.org/>
Ports system for Mac OS
More information about the macports-tickets
mailing list