[PATCH 34/52] CRED: Make Ext3 ACL set handlers pass credentials down

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make Ext3 ACL set handlers pass credentials down to lower functions.

Signed-off-by: David Howells <[email protected]>
---

 fs/ext3/acl.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/fs/ext3/acl.c b/fs/ext3/acl.c
index 1db810a..239efa9 100644
--- a/fs/ext3/acl.c
+++ b/fs/ext3/acl.c
@@ -483,9 +483,8 @@ ext3_xattr_get_acl_default(struct inode *inode, const char *name,
 
 static int
 ext3_xattr_set_acl(struct inode *inode, int type, const void *value,
-		   size_t size)
+		   size_t size, struct cred *cred)
 {
-	struct cred *cred = current->cred;
 	handle_t *handle;
 	struct posix_acl *acl;
 	int error, retries = 0;
@@ -526,18 +525,20 @@ static int
 ext3_xattr_set_acl_access(struct inode *inode, const char *name,
 			  const void *value, size_t size, int flags)
 {
+	struct cred *cred = current->cred;
 	if (strcmp(name, "") != 0)
 		return -EINVAL;
-	return ext3_xattr_set_acl(inode, ACL_TYPE_ACCESS, value, size);
+	return ext3_xattr_set_acl(inode, ACL_TYPE_ACCESS, value, size, cred);
 }
 
 static int
 ext3_xattr_set_acl_default(struct inode *inode, const char *name,
 			   const void *value, size_t size, int flags)
 {
+	struct cred *cred = current->cred;
 	if (strcmp(name, "") != 0)
 		return -EINVAL;
-	return ext3_xattr_set_acl(inode, ACL_TYPE_DEFAULT, value, size);
+	return ext3_xattr_set_acl(inode, ACL_TYPE_DEFAULT, value, size, cred);
 }
 
 struct xattr_handler ext3_xattr_acl_access_handler = {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux