public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Touloumtzis <miket@bluemug.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Zheng Jian-Ming <zjm@cis.nctu.edu.tw>, linux-kernel@vger.kernel.org
Subject: Re: problems with changing UID/GID
Date: Tue, 27 Aug 2002 14:21:02 -0700	[thread overview]
Message-ID: <20020827212102.GA7541@bluemug.com> (raw)
In-Reply-To: <1030369551.1750.4.camel@irongate.swansea.linux.org.uk>

On Mon, Aug 26, 2002 at 02:45:51PM +0100, Alan Cox wrote:
> On Mon, 2002-08-26 at 14:30, Zheng Jian-Ming wrote:
> 
> > But, the credentials are per-task in Linux, so it's possible to have
> > two tasks in a process running under different UIDs.
> 
> Really useful isnt it
> 
> There are other reasons for wanting refcounted credential structures (eg
> NFS writeback) so it may well be that once those go in for other reasons
> it makes sense to provide an option to do shared credentials for
> threaded apps. It is however nontrivial and you might want to see how
> your other systems respond to things like a file open on a slow device
> while a second thread is strobing the uid between two values. Does it
> change uid mid syscall, does it get the permissions checks right if so ?
> 
> Its non trivial stuff, if not plain crazy to implement a literal
> interpretation of (eg does a write fail half way if you change userid in
> another thread ?)

Does POSIX really require that granularity of change?  Would an
implementation which, say, stored all credentials per-thread/task
and only picked up changes from other threads at kernel entry/exit
not be in spec?  That seems like a lower overhead solution than
locking all access to UIDs.

miket

  reply	other threads:[~2002-08-27 21:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-26 13:30 problems with changing UID/GID Zheng Jian-Ming
2002-08-26 13:45 ` Alan Cox
2002-08-27 21:21   ` Mike Touloumtzis [this message]
2002-08-28 11:51   ` Florian Weimer
2002-08-28 14:01     ` Alan Cox
2002-08-26 14:58 ` Thunder from the hill
2002-08-26 17:16   ` Alan Cox
2002-08-26 17:31     ` Thunder from the hill
2002-08-26 18:47     ` Trond Myklebust
2002-08-26 18:49     ` Luca Barbieri
2002-08-27  7:54     ` Chris Wedgwood
2002-08-27 15:42       ` Thunder from the hill
2002-08-27 18:12         ` Chris Wedgwood
2002-08-27 19:08           ` Thunder from the hill
2002-08-27 20:00             ` Chris Wedgwood
2002-08-27 20:25               ` Thunder from the hill
2002-08-27 20:52                 ` Chris Wedgwood
2002-08-27 19:35       ` Trond Myklebust
2002-08-27 20:01         ` Chris Wedgwood
2002-08-27 22:09           ` Trond Myklebust
2002-08-28 14:24             ` Dave McCracken
2002-08-28 18:30               ` Trond Myklebust
2002-08-28 20:59                 ` Dave McCracken
2002-08-28 23:20                   ` Trond Myklebust

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=20020827212102.GA7541@bluemug.com \
    --to=miket@bluemug.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zjm@cis.nctu.edu.tw \
    /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