Re: [RFD] 'nice' attribute for executable files

2005-04-01 Thread Horst von Brand
Wiktor <[EMAIL PROTECTED]> said: > Horst von Brand wrote: > > Even better: Write a C wrapper for each affected program that just renices > > it as needed. > I suggest to implement scalable solution, so the final user wont't have > to write separate wrapper for *each* program. Final user doesn't.

Re: [RFD] 'nice' attribute for executable files

2005-04-01 Thread Måns Rullgård
Wiktor <[EMAIL PROTECTED]> writes: > Horst von Brand wrote: >> Even better: Write a C wrapper for each affected program that just >> renices >> it as needed. > > I suggest to implement scalable solution, so the final user wont't > have to write separate wrapper for *each* program. universal wrappe

Re: [RFD] 'nice' attribute for executable files

2005-04-01 Thread Måns Rullgård
Wiktor <[EMAIL PROTECTED]> writes: > Måns Rullgård wrote: >> So you are proposing the addition of a per-file attribute, with >> restricted access, and potentially dangerous effects if set >> incorrectly. This, combined with the fact that is unlikely to receive >> much testing, all speaks against

Re: [RFD] 'nice' attribute for executable files

2005-04-01 Thread Wiktor
Horst von Brand wrote: Even better: Write a C wrapper for each affected program that just renices it as needed. I suggest to implement scalable solution, so the final user wont't have to write separate wrapper for *each* program. universal wrapper is better solution, but (now i know, that impleme

Re: [RFD] 'nice' attribute for executable files

2005-04-01 Thread Wiktor
Måns Rullgård wrote: So you are proposing the addition of a per-file attribute, with restricted access, and potentially dangerous effects if set incorrectly. This, combined with the fact that is unlikely to receive much testing, all speaks against it. Almost every attribute can be dangerous if set

Re: [RFD] 'nice' attribute for executable files

2005-03-31 Thread Måns Rullgård
Horst von Brand <[EMAIL PROTECTED]> writes: > =?iso-8859-1?q?M=E5ns_Rullg=E5rd?= <[EMAIL PROTECTED]> said: >> Wiktor <[EMAIL PROTECTED]> writes: > > [...] > >> > max renice ulimit is quite good idea, but it allows to change nice of >> > *any* process user has permissions to. it could be implemente

Re: [RFD] 'nice' attribute for executable files

2005-03-31 Thread Horst von Brand
=?iso-8859-1?q?M=E5ns_Rullg=E5rd?= <[EMAIL PROTECTED]> said: > Wiktor <[EMAIL PROTECTED]> writes: [...] > > max renice ulimit is quite good idea, but it allows to change nice of > > *any* process user has permissions to. it could be implemented also, > > but the idea of 'nice' file attribute is t

Re: [RFD] 'nice' attribute for executable files

2005-03-30 Thread Matt Mackall
On Tue, Mar 29, 2005 at 09:55:36PM +0200, Wiktor wrote: > Hi all, > > recently i had to run some program (xmms) with lowered nice value as > normal user. See the new nice rlimit in recent -mm. This allows you to give various users permission to raise priorities without root privileges. -- Math

Re: [RFD] 'nice' attribute for executable files

2005-03-30 Thread Jan Engelhardt
>> You could wrap /lib/ld-linux.so, and get all dynamically linked >> programs done in one sweep. That does not handle static binaries :) Jan Engelhardt -- No TOFU for me, please. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTE

Re: [RFD] 'nice' attribute for executable files

2005-03-30 Thread Lee Revell
On Wed, 2005-03-30 at 18:07 +0200, Wiktor wrote: > Bodo Eggert wrote: > > Wiktor <[EMAIL PROTECTED]> wrote: > >>so i thought that it would be nice to add an attribute to file > >>(changable only for root) that would modify nice value of process when > >>it starts. if there is one byte free in ext2/

Re: [RFD] 'nice' attribute for executable files

2005-03-30 Thread Bodo Eggert
On Wed, 30 Mar 2005, Wiktor wrote: > my xmms problem is unimportant here, i've posted this thread to propose > some new feature in filesystem, not to solve problem with multimedia player! You don't need a solution if there is no problem. > max renice ulimit is quite good idea, but it allows to

Re: [RFD] 'nice' attribute for executable files

2005-03-30 Thread Måns Rullgård
Wiktor <[EMAIL PROTECTED]> writes: > Måns Rullgård wrote: >> >> You could wrap /lib/ld-linux.so, and get all dynamically linked >> programs done in one sweep. >> > That's mad idea - Sure, but it's possible. > keep similar things in one place! starting programs is done in > kernel and nice-value-

Re: [RFD] 'nice' attribute for executable files

2005-03-30 Thread Wiktor
Måns Rullgård wrote: You could wrap /lib/ld-linux.so, and get all dynamically linked programs done in one sweep. That's mad idea - keep similar things in one place! starting programs is done in kernel and nice-value-support is also done in kernel!! Using a shell to run external programs is quite

Re: [RFD] 'nice' attribute for executable files

2005-03-30 Thread Bill Davidsen
Wiktor wrote: so i thought that it would be nice to add an attribute to file (changable only for root) that would modify nice value of process when it starts. if there is one byte free in ext2/3 file metadata, maybe it could be used for that? i think that it woundn't be more dangerous than setu

Re: [RFD] 'nice' attribute for executable files

2005-03-30 Thread Måns Rullgård
Wiktor <[EMAIL PROTECTED]> writes: > Måns Rullgård wrote: >> It can be done entirely in userspace, if you want it. Just hack your >> shell to examine some extended attribute of your choice, and adjust >> the nice value before executing files. Then arrange to have the shell >> run with a negative

Re: [RFD] 'nice' attribute for executable files

2005-03-30 Thread Wiktor
Måns Rullgård wrote: It can be done entirely in userspace, if you want it. Just hack your shell to examine some extended attribute of your choice, and adjust the nice value before executing files. Then arrange to have the shell run with a negative nice value. This can be easily accomplished with

Re: [RFD] 'nice' attribute for executable files

2005-03-30 Thread Måns Rullgård
Wiktor <[EMAIL PROTECTED]> writes: > max renice ulimit is quite good idea, but it allows to change nice of > *any* process user has permissions to. it could be implemented also, > but the idea of 'nice' file attribute is to allow *only* some process > be run with lower nice. what's more, that nice

Re: [RFD] 'nice' attribute for executable files

2005-03-30 Thread Wiktor
Bodo Eggert wrote: Wiktor <[EMAIL PROTECTED]> wrote: so i thought that it would be nice to add an attribute to file (changable only for root) that would modify nice value of process when it starts. if there is one byte free in ext2/3 file metadata, maybe it could be used for that? i think that it w

Re: [RFD] 'nice' attribute for executable files

2005-03-29 Thread Bodo Eggert
Wiktor <[EMAIL PROTECTED]> wrote: > furthermore, on many systems root may want to make users able to run > some program with lowered nice, but not from root account and without > having to know the root password... i've found a way to do this using > shell scripts combined with suid bit and strang

Re: [RFD] 'nice' attribute for executable files

2005-03-29 Thread Lee Revell
On Tue, 2005-03-29 at 21:55 +0200, Wiktor wrote: > Hi all, > > recently i had to run some program (xmms) with lowered nice value as > normal user. to do that i had to su to the root account and then execute > nice --5 xmms. Let me guess, the sound skips unless you run at a low nice value. That'

[RFD] 'nice' attribute for executable files

2005-03-29 Thread Wiktor
Hi all, recently i had to run some program (xmms) with lowered nice value as normal user. to do that i had to su to the root account and then execute nice --5 xmms. but, then xmms was run as root and X server refused connection, so i had to do second su from root account. (total: su nice --5 su