linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: dhowells@redhat.com, Stephen Rothwell <sfr@canb.auug.org.au>,
	James Morris <jmorris@namei.org>,
	linux-next@vger.kernel.org, David Chinner <david@fromorbit.com>,
	Lachlan McIlroy <lachlan@sgi.com>
Subject: Re: linux-next: manual merge of the creds tree
Date: Thu, 30 Oct 2008 10:14:07 +0000	[thread overview]
Message-ID: <12531.1225361647@redhat.com> (raw)
In-Reply-To: <20081030080343.GA20548@infradead.org>


Hi Christoph,

Could you pull my XFS wrapper patch into the XFS tree?  That might make things
easier for Stephen.  The prerequisite patch is already upstream.  Now if only
Linus would take the rest of it.

David
---
From: David Howells <dhowells@redhat.com>

CRED: Wrap task credential accesses in the XFS filesystem

Wrap access to task credentials so that they can be separated more easily from
the task_struct during the introduction of COW creds.

Change most current->(|e|s|fs)[ug]id to current_(|e|s|fs)[ug]id().

Change some task->e?[ug]id to task_e?[ug]id().  In some places it makes more
sense to use RCU directly rather than a convenient wrapper; these will be
addressed by later patches.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Cc: xfs@oss.sgi.com
---

 fs/xfs/linux-2.6/xfs_cred.h  |    2 +-
 fs/xfs/linux-2.6/xfs_ioctl.c |    2 +-
 fs/xfs/xfs_acl.c             |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)


diff --git a/fs/xfs/linux-2.6/xfs_cred.h b/fs/xfs/linux-2.6/xfs_cred.h
index 652721c..293043a 100644
--- a/fs/xfs/linux-2.6/xfs_cred.h
+++ b/fs/xfs/linux-2.6/xfs_cred.h
@@ -24,7 +24,7 @@
  * Credentials
  */
 typedef struct cred {
-	/* EMPTY */
+       /* EMPTY */
 } cred_t;
 
 extern struct cred *sys_cred;
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index d3438c7..67c72ae 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -1007,7 +1007,7 @@ xfs_ioctl_setattr(
 	 * to the file owner ID, except in cases where the
 	 * CAP_FSETID capability is applicable.
 	 */
-	if (current->fsuid != ip->i_d.di_uid && !capable(CAP_FOWNER)) {
+	if (current_fsuid() != ip->i_d.di_uid && !capable(CAP_FOWNER)) {
 		code = XFS_ERROR(EPERM);
 		goto error_return;
 	}
diff --git a/fs/xfs/xfs_acl.c b/fs/xfs/xfs_acl.c
index b2f639a..91d6933 100644
--- a/fs/xfs/xfs_acl.c
+++ b/fs/xfs/xfs_acl.c
@@ -366,7 +366,7 @@ xfs_acl_allow_set(
 		return ENOTDIR;
 	if (vp->i_sb->s_flags & MS_RDONLY)
 		return EROFS;
-	if (XFS_I(vp)->i_d.di_uid != current->fsuid && !capable(CAP_FOWNER))
+	if (XFS_I(vp)->i_d.di_uid != current_fsuid() && !capable(CAP_FOWNER))
 		return EPERM;
 	return 0;
 }
@@ -413,13 +413,13 @@ xfs_acl_access(
 		switch (fap->acl_entry[i].ae_tag) {
 		case ACL_USER_OBJ:
 			seen_userobj = 1;
-			if (fuid != current->fsuid)
+			if (fuid != current_fsuid())
 				continue;
 			matched.ae_tag = ACL_USER_OBJ;
 			matched.ae_perm = allows;
 			break;
 		case ACL_USER:
-			if (fap->acl_entry[i].ae_id != current->fsuid)
+			if (fap->acl_entry[i].ae_id != current_fsuid())
 				continue;
 			matched.ae_tag = ACL_USER;
 			matched.ae_perm = allows;

  reply	other threads:[~2008-10-30 10:14 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30  4:47 linux-next: manual merge of the creds tree Stephen Rothwell
2008-10-30  8:03 ` Christoph Hellwig
2008-10-30 10:14   ` David Howells [this message]
2008-10-30 10:16     ` Christoph Hellwig
2008-10-30 12:31       ` David Howells
2008-10-31  0:55       ` Lachlan McIlroy
2008-10-31  2:49         ` Stephen Rothwell
2008-10-31  9:02         ` David Howells
2008-10-30 10:14 ` David Howells
2008-12-29  4:06 ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2008-11-13  5:24 Stephen Rothwell
2008-11-13 12:33 ` David Howells
2008-11-13 12:45   ` Stephen Rothwell
2008-11-13 14:46   ` Serge E. Hallyn
2008-11-13  5:19 Stephen Rothwell
2008-11-13  5:09 Stephen Rothwell
2008-11-12  5:30 Stephen Rothwell
2008-11-12 18:23 ` David Howells
2008-11-12 22:32   ` Stephen Rothwell
2008-11-12  5:22 Stephen Rothwell
2008-11-07  7:49 Stephen Rothwell
2008-11-07 15:04 ` David Howells
2008-11-05  4:56 Stephen Rothwell
2008-11-05 12:08 ` David Howells
2008-11-05 23:19   ` James Morris
2008-11-06 11:13     ` David Howells
2008-10-31  6:06 Stephen Rothwell
2008-10-31  9:16 ` David Howells
2008-10-31 21:32 ` Eric Paris
2008-10-31  5:56 Stephen Rothwell
2008-10-31 10:37 ` David Howells
2008-10-31  5:47 Stephen Rothwell
2008-10-31  9:03 ` David Howells
2008-10-31 16:54 ` Eric Sandeen
2008-10-21  6:07 Stephen Rothwell
2008-10-21 14:30 ` David Howells
2008-10-20  8:18 Stephen Rothwell
2008-10-20 11:55 ` David Howells
2008-10-17  6:13 Stephen Rothwell
2008-10-17 10:34 ` David Howells
2008-10-17 10:38 ` Kirill A. Shutemov
2008-10-17  6:08 Stephen Rothwell
2008-10-17 10:34 ` David Howells
2008-10-15 10:12 Stephen Rothwell
2008-10-15 12:00 ` David Howells
2008-10-15 10:05 Stephen Rothwell
2008-10-15 11:52 ` David Howells
2008-10-15 10:00 Stephen Rothwell
2008-10-15 12:02 ` David Howells
2008-10-15  9:55 Stephen Rothwell
2008-10-15 12:02 ` David Howells
2008-10-16  7:33   ` Stephen Rothwell
2008-10-15  9:48 Stephen Rothwell
2008-10-15 12:00 ` David Howells
2008-08-29  8:14 Stephen Rothwell
2008-08-29  8:56 ` James Morris
2008-08-29 10:18 ` David Howells
2008-08-28  6:42 Stephen Rothwell
2008-08-27  6:59 Stephen Rothwell
2008-08-18  6:33 Stephen Rothwell
2008-08-18  6:37 ` Stephen Rothwell
2008-08-15  7:38 Stephen Rothwell
2008-08-14  5:59 Stephen Rothwell
2008-08-12  7:13 Stephen Rothwell
2008-08-12  7:09 Stephen Rothwell
2008-08-08  6:08 Stephen Rothwell
2008-08-08  7:29 ` David Howells
2008-08-08  9:23 ` James Morris
2008-08-10 12:53   ` Stephen Rothwell
2008-08-10 13:23     ` Stephen Rothwell
2008-08-08  6:01 Stephen Rothwell
2008-08-08  6:03 ` Stephen Rothwell
2008-08-08 11:41   ` Jeff Layton
2008-08-08 15:25     ` Steve French

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=12531.1225361647@redhat.com \
    --to=dhowells@redhat.com \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=jmorris@namei.org \
    --cc=lachlan@sgi.com \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).