[Alsaplayer-devel]Gtk+ problems with Alsaplayer as suid root

patrick reardon spatrick@flash.net
Wed, 20 Feb 2002 01:16:29 -0600


hi Andy, 

thanks for all your help.  i'm still having problems running jackd as root and
Alsaplayer as a normal user.  it's not a big problem though since it works
beautifully if started as root.  anyway, here it is.

Andy Lo A Foe wrote:
> 
> On Sat, Feb 16, 2002 at 08:36:13PM -0600, patrick reardon wrote:
> 
> > #alsaplayer -o jack
> >
> > it sounds perfect!!  speed is just right and i can't cause a dropout or pop even
> > with lots of other activity.
> 
> Nice! Currently jack requires that you run client under the same user as
> the jackd server. You can optionally make alsaplayer suid root, I just
> fixed a bug that prevented the gtk+ interface from coming up when
> running suid root.

is that change in CVS yet?  just checked -- looks like maybe it was committed on
feb 12.  found this in CVS under ~/alsaplayer/interface/gtk

gtk.cpp  1.11  7 days  adnans   Drop root before initializing gtk+, when run as
suid root


tonight checked out the lastest CVS of alsaplayer, built and installed it.  then
as root i ran 

# chmod +s /usr/bin/alsaplayer

to set the set-uid bit.  (hope this is correct, could only find limited info on
how to do this.)  checking permissions

$ ls -l /usr/bin/alsaplayer
 916 -rwsr-sr-x   1 root       931562 Feb 19 23:19 /usr/bin/alsaplayer

that looked okay so started jackd as root to get realtime sched'g.  then tried
to start Alsaplayer as a normal user, but got this gtk+ error.

------------------------snip------
$ alsaplayer -o jack
AlsaPlayer 0.99.54
(C) 1999-2002 Andy Lo A Foe <andy@alsaplayer.org> and others.
connecting to jack ports: alsa_pcm:out_1 & alsa_pcm:out_2
Loading Interface plugin: GTK+ interface v1.0

Gtk-WARNING **: This process is currently running setuid or setgid.
This is not a supported use of GTK+. You must create a helper
program instead. For further details, see:

    http://www.gtk.org/setuid.html

Refusing to initialize GTK+.
-------------------------snip-------


i don't get it.  did i do something wrong?  i'll get some sleep and try again
tomorrow.

tia for any help,
patrick