From: Bodo Eggert <7eggert@gmx.de>
To: Wiktor <victorjan@poczta.onet.pl>
Cc: 7eggert@gmx.de, linux-kernel@vger.kernel.org
Subject: Re: [RFD] 'nice' attribute for executable files
Date: Wed, 30 Mar 2005 21:40:34 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.58.0503301939040.6713@be1.lrz> (raw)
In-Reply-To: <424ACEA9.6070401@poczta.onet.pl>
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 change nice of
> *any* process user has permissions to.
In both of your examples (including the one below), the same thing
applies.
> 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 would be *always* the same
> (at process startup)!
> example:
> web server runs as user www. it spawns perl interpreter that root wants
> to be run with lower nice, but he doesn't want to allow 'www' user to
> renice *any* process (for eg. this user is shared with webmaster, and
> webmaster is malicious person; i know, the webmaster could have another
> accout, but maybe for some file-ownership reasons, root doesn't want to
> create special account for him).
chown root.root /usr/local/cgi-bin/somescript
chmod 755 /usr/local/cgi-bin/somescript
---/etc/su1.priv---
alias somescript /usr/bin/nice -n -5 su wwwrun -- exec /usr/local/cgi-bin/somescript.pl
ask never
allow wwwrun prefix somescript
---
ln -s /usr/bin/su1 /srv/wwwroot/cgi-bin/somescript
If you need the same command for a group of users, you can use a wrapper
scritp that will look at the $HOME variable (which is set from
/etc/passwd)
> in this situation, setting nice-attribute for /usr/bin/perl solves the
> problem.
perl -e'exec("/bin/sh");' would grant nice privileges to anybody, and
that's not nice!
> remember, that this feature would also provide an easy way to
> increase nice level.
Not for running processes.
> it can be done with shell script, but setting nice
> value in file attributes is cleaner and easier to manage.
Obviously not.
--
Top 100 things you don't want the sysadmin to say:
35. Ummm... Didn't you say you turned it off?
next prev parent reply other threads:[~2005-03-30 20:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa.ed33rit.1e148rh@ifi.uio.no>
2005-03-29 20:45 ` Bodo Eggert
2005-03-30 16:07 ` Wiktor
2005-03-30 16:55 ` Måns Rullgård
2005-03-30 17:27 ` Wiktor
2005-03-30 19:03 ` Måns Rullgård
2005-03-30 20:16 ` Wiktor
2005-03-30 20:43 ` Måns Rullgård
2005-04-01 15:26 ` Wiktor
2005-04-01 16:07 ` Måns Rullgård
2005-03-31 5:46 ` Jan Engelhardt
2005-03-31 15:56 ` Horst von Brand
2005-03-31 16:05 ` Måns Rullgård
2005-04-01 15:40 ` Wiktor
2005-04-01 16:12 ` Måns Rullgård
2005-04-01 17:27 ` Horst von Brand
2005-03-30 19:40 ` Bodo Eggert [this message]
2005-03-30 21:03 ` Lee Revell
2005-03-29 19:55 Wiktor
2005-03-29 21:02 ` Lee Revell
2005-03-30 19:55 ` Bill Davidsen
2005-03-31 5:51 ` Matt Mackall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.58.0503301939040.6713@be1.lrz \
--to=7eggert@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=victorjan@poczta.onet.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®