mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Dave McCracken <dmccr@us.ibm.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	linux-kernel@vger.kernel.org
Subject: Re: problems with changing UID/GID
Date: Wed, 28 Aug 2002 20:30:53 +0200	[thread overview]
Message-ID: <15725.5853.229315.140365@charged.uio.no> (raw)
In-Reply-To: <19220000.1030544663@baldur.austin.ibm.com>

>>>>> " " == Dave McCracken <dmccr@us.ibm.com> writes:

     > Shouldn't the Linux cred structure include the capabilities, as
     > well?  What about places that want to see both uid and euid?
     > Shouldn't euid/egid also be in the structure?  I realize that
     > for file operations they're not strictly necessary, but we
     > should make the structure useful across all parts of the kernel
     > that want to see credentials.

The BSD approach is to split out the user credentials, since they are
used all over the place in the filesystems, and often need to be
cached. The uid, euid, ... are kept in a reference-counted 'process'
credential of the form

struct pcred {
       struct ucred *ucred;
       uid_t uid, euid, suid;
       gid_t gid, egid, sgid;
       int count;
};

In Linux, we should probably also include the capabilities as part of
the pcred. They sort of fall outside the BSD model, so it's hard to
tell exactly where they belong...
That said, I'm motivated to move away from thinking that they belong
in the ucred, by the fact that capabilities contain information about
whether or not you are allowed to change those user credentials. That
just doesn't fit with the idea of copy on write.

     > BTW, you've convinced me that your approach is the right way to
     > go.  I'll make another stab at CLONE_CRED after the VFS changes
     > are made, which will make it a 2.7 item, I'm sure.

Great. As I said, I've resumed working on the ucred stuff. Expect the
first patches to be announced for 2.5.x soon. The first few patches
are ready, I just need to test them with a post-2.5.32 kernel (as soon
as I find one that will actually boot on my laptop even without the
patches applied).

Note: If you'd like to take a peek at what I've got (and help me with
some feedback), see the directory

  http://www.fys.uio.no/~trondmy/src/2.5.32-alpha

Cheers,
  Trond

  reply	other threads:[~2002-08-28 18:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-26 13:30 Zheng Jian-Ming
2002-08-26 13:45 ` Alan Cox
2002-08-27 21:21   ` Mike Touloumtzis
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 [this message]
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=15725.5853.229315.140365@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=dmccr@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /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®