On 07/04/2010 16:04, Brian Cameron wrote:
I did not feel that is necessary since the audioctl functions being
called are specific and not dangerous, but this seems a reasonable
change. Would the best way to do this be to call:

su - $USER -c "/usr/bin/audioctl (args)"

It would be if su(1M) actually had a documented "-c" argument. That will work though.

The PreSession script could check the ownership of /dev/audio and only
call "audioctl load-controls" if /dev/audio is already owned by the
user. It is a bit of a drag to follow all the /dev/audio symlinks,
but it would be smarter.

It it runs as the user logging in that wouldn't be necessary since the user won't be able to change the settings if logindevperm didn't give them access to the devices.

The code to load the settings could be moved to the /etc/gdm/Xsession
script after it sources the user's $HOME/.profile so that if the user
sets $AUDIODEV there, it would be honored. Would this be a reasonable
solution? Note that this /etc/gdm/Xsession script runs as the user
rather than root, but this shouldn't be a problem.

That sounds like a better place to me since it avoids the 'su' and it runs in the users environment.

--
Darren J Moffat
_______________________________________________
opensolaris-arc mailing list
[email protected]

Reply via email to