[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071012160539.15119.25313.stgit@warthog.procyon.org.uk>
Date: Fri, 12 Oct 2007 17:05:39 +0100
From: David Howells <dhowells@...hat.com>
To: viro@....linux.org.uk
Cc: kwc@...i.umich.edu, Trond.Myklebust@...app.com,
linux-kernel@...r.kernel.org, dhowells@...hat.com
Subject: [PATCH 04/52] CRED: Pass credentials down to ext3 inode allocator
Pass credentials down to the ext3 inode allocator.
Signed-off-by: David Howells <dhowells@...hat.com>
---
fs/ext3/ialloc.c | 6 +++---
fs/ext3/xattr.h | 4 ++--
fs/ext3/xattr_security.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/ext3/ialloc.c b/fs/ext3/ialloc.c
index 596d8ca..7335461 100644
--- a/fs/ext3/ialloc.c
+++ b/fs/ext3/ialloc.c
@@ -547,7 +547,7 @@ got:
percpu_counter_inc(&sbi->s_dirs_counter);
sb->s_dirt = 1;
- inode->i_uid = current->cred->uid;
+ inode->i_uid = cred->uid;
if (test_opt (sb, GRPID))
inode->i_gid = dir->i_gid;
else if (dir->i_mode & S_ISGID) {
@@ -555,7 +555,7 @@ got:
if (S_ISDIR(mode))
mode |= S_ISGID;
} else
- inode->i_gid = current->cred->gid;
+ inode->i_gid = cred->gid;
inode->i_mode = mode;
inode->i_ino = ino;
@@ -607,7 +607,7 @@ got:
if (err)
goto fail_free_drop;
- err = ext3_init_security(handle,inode, dir);
+ err = ext3_init_security(handle,inode, dir, cred);
if (err)
goto fail_free_drop;
diff --git a/fs/ext3/xattr.h b/fs/ext3/xattr.h
index 761772a..8d00a18 100644
--- a/fs/ext3/xattr.h
+++ b/fs/ext3/xattr.h
@@ -137,10 +137,10 @@ exit_ext3_xattr(void)
#ifdef CONFIG_EXT3_FS_SECURITY
extern int ext3_init_security(handle_t *handle, struct inode *inode,
- struct inode *dir);
+ struct inode *dir, struct cred *cred);
#else
static inline int ext3_init_security(handle_t *handle, struct inode *inode,
- struct inode *dir)
+ struct inode *dir, struct cred *cred)
{
return 0;
}
diff --git a/fs/ext3/xattr_security.c b/fs/ext3/xattr_security.c
index 76ccead..9a949e3 100644
--- a/fs/ext3/xattr_security.c
+++ b/fs/ext3/xattr_security.c
@@ -50,9 +50,9 @@ ext3_xattr_security_set(struct inode *inode, const char *name,
}
int
-ext3_init_security(handle_t *handle, struct inode *inode, struct inode *dir)
+ext3_init_security(handle_t *handle, struct inode *inode, struct inode *dir,
+ struct cred *cred)
{
- struct cred *cred = current->cred;
int err;
size_t len;
void *value;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists