mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Samuelson <peter@cadcamlab.org>
To: BERECZ Szabolcs <szabi@inf.elte.hu>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] new setprocuid syscall
Date: Tue, 20 Feb 2001 06:52:48 -0600 (CST)	[thread overview]
Message-ID: <14994.26784.82642.367253@wire.cadcamlab.org> (raw)
In-Reply-To: <20010219230106.A23699@cadcamlab.org> <Pine.A41.4.31.0102201250290.127214-100000@pandora.inf.elte.hu>


[BERECZ Szabolcs]
> > Race -- you need to make sure the task_struct doesn't disappear out
> > from under you.
> 
> Yes, but we need a write_lock, not a read_lock.

No, it's a read_lock because it is locking the task *list*, which is
not being changed.  The only thing being changed is data within a task
struct.  The lock is merely to prevent the task itself from
disappearing.

> We need a userspace tool, because we must check if the user, who want
> to change the uid, knows the other user's passwd.
> Or what if user1 want to change user2's process to user3 uid?

That is a mere 'sudo'-type issue -- just a matter of figuring out who
has the right to do this to whom and under what circumstances.  Root,
in any case, can do the job without a special tool.

Anyhow, according to Alan bad things can happen if the uid set is
changed unexpectedly.  I assume he means certain permissions checks
could be confused by accessing ->euid more than once and getting
different answers.  If so, I agree that this is a bad idea....

Peter

  reply	other threads:[~2001-02-20 12:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-19 22:18 BERECZ Szabolcs
2001-02-20  5:01 ` Peter Samuelson
2001-02-20 10:53   ` Martin Dalecki
2001-02-20 13:00     ` Peter Samuelson
2001-02-20 11:42   ` Alan Cox
2001-02-20 13:11     ` Peter Samuelson
2001-02-20 13:52       ` Alan Cox
2001-02-20 17:04         ` BERECZ Szabolcs
2000-01-01  0:28           ` Pavel Machek
2001-02-21  4:19           ` Peter Samuelson
2001-02-20 12:14   ` BERECZ Szabolcs
2001-02-20 12:52     ` Peter Samuelson [this message]
2001-02-20 12:02 ` Philipp Rumpf
2001-02-20 14:19 Petr Vandrovec
2001-02-23 17:13 Bernd Jendrissek

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=14994.26784.82642.367253@wire.cadcamlab.org \
    --to=peter@cadcamlab.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=szabi@inf.elte.hu \
    /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®