[lug] automatic renice?

Bear Giles bgiles at coyotesong.com
Sat Jun 18 15:34:10 MDT 2005


After I wrote that I realized that the most general way of handing 
that is to treat the arguments as the program (with arguments) to 
run, not hardcode the application to be run.

It would be a lot like 'sudo', but with only one action.

That raises another question - why not use sudo with a restriction 
that the only program that can be run is 'nice'.

D. Stimits wrote:
> Bear Giles wrote:
> 
>> D. Stimits wrote:
>>
>>> This latter would not work, unless I make some sort of sudo retrofit. 
>>> Renice to negative values (I'm increasing priority of x2x) requires 
>>> root, but non-root will be running it.
>>
>>
>>
>> So write a suid C wrapper.  It changes the nice level, changes the uid 
>> and euid to the caller's uid, and execs the original program.
> 
> 
> I was hoping for a general facility/system mechanism, rather than suid 
> or customization of each program. Just thought it would be nice if 
> /etc/sysconfig/ had something I didn't know about to set priorities.
> 
> D. Stimits, stimits AT comcast DOT net
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug




More information about the LUG mailing list