Bugzilla – Bug 9384
slimserver.pl --user <$USER> does run transoder programs as root and not as $USER
Last modified: 2011-03-16 04:39:21 UTC
Hi, while debugging another problem i found out, that programs like flac or lame (called while transcoding) are executed as root and not as the user specified with --user <USER> on the command line. I'm running SC 7.3-trunk, with root@host:/.../slimserver.pl ... --user control ps-output: $ ps auxw |grep -i squee |grep -v mysql control 20692 0.7 4.0 247872 162352 ? Ss 21:42 0:06 /usr/bin/perl -w /opt/squeezecenter/slimserver.pl --daemon --logdir /var/log/squeezecenter --pidfile /var/run/squeezecenter.pid --prefsdir /home/control/squeezecenter/prefs --playlistdir /home/control/squeezecenter/playlist --cachedir /home/control/squeezecenter/cache --user control --group users control 20713 0.0 0.0 1568 488 ? S 21:43 0:00 /opt/SqueezeCenter_svn/7.3/trunk/server/Bin/i386-linux/mDNSResponderPosix -f /home/control/squeezecenter/cache/mDNS.conf root 20782 0.0 0.0 11160 1312 ? S 21:54 0:00 sh -c "/opt/SqueezeCenter_svn/7.3/trunk/server/Bin/i386-linux/flac" -dcs --skip=0 --until=-0 -- "-" | "/usr/bin/lame" --silent -q 3 -v -B 128 - - root 20783 0.6 0.0 7016 836 ? S 21:54 0:00 /opt/SqueezeCenter_svn/7.3/trunk/server/Bin/i386-linux/flac -dcs --skip=0 --until=-0 -- - AFAIK the problem is in the area of "uid, euid and open2". I've attached a test.pl programm to bug 9356 (I know it's offtopic there ;-) You'll not see this in problem in any distro packages, because suse uses: ...startproc -u $SQUEEZECENTER_USER $SQUEEZECENTER_BIN $SQUEEZECENTER_ARGS... redhat: ...daemon --user $SQUEEZECENTER_USER $SQUEEZECENTER_BIN $SQUEEZECENTER_ARGS... debian/ubuntu: ...start-stop-daemon --start --quiet --chuid $SLIMUSER... Those helper programs will drop root privileges and from SC's POV it's uid=euid=$USER and therefore no problem. I'd like to see lame/flac/... being executed as $USER. If this is not feasible please tell me and i'll revert to start-stop-daemon for my installation. thanks! kind regards, Markus
This is kind of a dupe of bug 5035. Basically, --user and --group seem to be broken.
We are now planning to make a 7.3.3 release. Please review your bugs (all marked open against 7.3.3) to see if they can be fixed in the next few weeks, or if they should be retargeted for 7.4 or future. Thanks!
Since there's now a planned 7.3.3 release, bugs which won't make the cut-off are being moved to the next target out. If you feel that this bug needs to be addressed more (or less) urgently than the 7.4 release, please cc chris@slimdevices.com and leave a comment in the bug to that effect so we can review it. Thanks.
For some reason Bugzilla did not change the target when I did this yesterday. Or maybe it was me. In either case, I'm trying it again.
Moving 7.4 bugs to 8.0.