Losing (realtime) permission when sudoing from root to myself
After an upgrade to debian wheezy (I did not upgrade the kernel - it is
still 3.8.2) I can no longer start jackd in the way I used to do it. I get
you are not allowed to use realtime scheduling.
My investigation show, that this is related to a sudo command in my
script, where I sudo from root to martin. The sudo is required, because I
start jackd when my firewire mixing console gets switched on, using an
udev rule. I can reproduce the problem by typing sudo from the
commandline.
In short, this is what I observe
start jackd as martin -> works
start jackd as root -> works
login as root and su - martin, then start jackd -> works
as root sudo -u martin /usr/bin/jackd ... -> does not work
as above but sudo -E -u martin ... -> does not work
My /etc/security/limits.conf contains these lines
@audio - rtprio 40
@audio - nice -20
@audio - memlock 1554963
sudo -u martin id shows that I am in the audio group, however root is not.
After sudoing from root to martin, martin has no realtime permissions
sudo -u martin sh -c "ulimit -e -r"
scheduling priority (-e) 0
real-time priority (-r) 0
Adding root to the audo group made no difference. Root still has no
realtime permissions and after sudo -u martin martin still looks as above
No comments:
Post a Comment