From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Dave McCracken <dmccr@us.ibm.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2.5.30+] Second attempt at a shared credentials patch
Date: 08 Aug 2002 17:32:05 +0200 [thread overview]
Message-ID: <shsofcdfjt6.fsf@charged.uio.no> (raw)
In-Reply-To: <23130000.1028818693@baldur.austin.ibm.com>
>>>>> " " == Dave McCracken <dmccr@us.ibm.com> writes:
> This patch allows tasks to share credentials via a flag to
> clone().
> This version fixes the problem with exec() that Linus found.
> Tasks that call exec() get their own copy of the credentials at
> that point.
> The URL is here because it's too big to include in email:
> http://www.ibm.com/linux/ltc/patches/misc/cred-2.5.30-3.diff.gz
What the hell is that change to fs/nfs/dir.c below all about? Try
mounting an NFSv2 partition with that applied...
Instead of doing this as one big unreadable monolithic patch and
risking getting things wrong like in the above case, it would be nice
if you could go via a set of wrapper functions:
#define get_current_uid() (current->uid)
#define set_current_uid(a) current->uid = a
.
.
.
...
That would allow you to make the changes to the lower level filesystem
code in smaller babysteps, and make the actual move to 'struct cred' a
trivial patch...
As I argued before when Ben first presented this, that will also allow
us the flexibility to change the structure at a later date. Several
filesystems could benefit from a shared *BSD-style 'struct ucred' to
replace the tuple current->{ fsuid, fsgid, groups }.
Cheers,
Trond
diff -Nru a/fs/nfs/dir.c b/fs/nfs/dir.c
--- a/fs/nfs/dir.c Wed Aug 7 09:08:23 2002
+++ b/fs/nfs/dir.c Wed Aug 7 09:08:23 2002
@@ -1237,9 +1237,6 @@
lock_kernel();
- if (!NFS_PROTO(inode)->access)
- goto out_notsup;
-
cred = rpcauth_lookupcred(NFS_CLIENT(inode)->cl_auth, 0);
if (cache->cred == cred
&& time_before(jiffies, cache->jiffies + NFS_ATTRTIMEO(inode))) {
next prev parent reply other threads:[~2002-08-08 15:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-08 14:58 [PATCH 2.5.30+] Second attempt at a shared credentials patch Dave McCracken
2002-08-08 15:32 ` Trond Myklebust [this message]
2002-08-08 16:20 ` Dave McCracken
2002-08-08 16:54 ` Trond Myklebust
2002-08-08 18:05 ` Dave McCracken
2002-08-08 19:56 ` Trond Myklebust
2002-08-08 20:11 ` Dave McCracken
2002-08-08 21:55 ` Trond Myklebust
2002-08-09 19:24 ` [PATCH 2.5.30+] Fourth " Dave McCracken
2002-08-09 19:51 ` Trond Myklebust
2002-08-09 20:51 ` Dave McCracken
2002-08-12 20:08 ` Trond Myklebust
2002-08-09 21:15 ` Linus Torvalds
2002-08-08 20:11 ` [PATCH 2.5.30+] Second " 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=shsofcdfjt6.fsf@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