From bcb020341a7d0fba6cd025f068d40f4ab5c36af8 Mon Sep 17 00:00:00 2001 From: Steve French Date: Tue, 25 Sep 2007 16:17:24 +0000 Subject: [CIFS] move cifs acl code to new file and fix build break Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 fs/cifs/cifsacl.c (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c new file mode 100644 index 00000000000..11ac13336ec --- /dev/null +++ b/fs/cifs/cifsacl.c @@ -0,0 +1,134 @@ +/* + * fs/cifs/cifsacl.c + * + * Copyright (C) International Business Machines Corp., 2007 + * Author(s): Steve French (sfrench@us.ibm.com) + * + * Contains the routines for mapping CIFS/NTFS ACLs + * + * This library is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation; either version 2.1 of the License, or + * (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See + * the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* security id for everyone */ +static const struct cifs_sid sid_everyone = + {1, 1, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0}}; +/* group users */ +static const struct cifs_sid sid_user = + {1, 2 , {0, 0, 0, 0, 0, 5}, {32, 545, 0, 0}}; + +static int parse_sid(struct cifs_sid *psid, char *end_of_acl) +{ + /* BB need to add parm so we can store the SID BB */ + + /* validate that we do not go past end of acl */ + if (end_of_acl < (char *)psid + sizeof(struct cifs_sid)) { + cERROR(1, ("ACL to small to parse SID")); + return -EINVAL; + } +#ifdef CONFIG_CIFS_DEBUG2 + cFYI(1, ("revision %d num_auth %d First subauth 0x%x", + psid->revision, psid->num_auth, psid->sub_auth[0])); + + /* BB add length check to make sure that we do not have huge num auths + and therefore go off the end */ + cFYI(1, ("RID 0x%x", le32_to_cpu(psid->sub_auth[psid->num_auth]))); +#endif + return 0; +} + +/* Convert CIFS ACL to POSIX form */ +int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len) +{ + int i; + int num_aces = 0; + int acl_size; + struct cifs_sid *owner_sid_ptr, *group_sid_ptr; + struct cifs_acl *dacl_ptr; /* no need for SACL ptr */ + struct cifs_ntace **ppntace; + struct cifs_ace **ppace; + char *acl_base; + char *end_of_acl = ((char *)pntsd) + acl_len; + + owner_sid_ptr = (struct cifs_sid *)((char *)pntsd + + cpu_to_le32(pntsd->osidoffset)); + group_sid_ptr = (struct cifs_sid *)((char *)pntsd + + cpu_to_le32(pntsd->gsidoffset)); + dacl_ptr = (struct cifs_acl *)((char *)pntsd + + cpu_to_le32(pntsd->dacloffset)); +#ifdef CONFIG_CIFS_DEBUG2 + cFYI(1, ("revision %d type 0x%x ooffset 0x%x goffset 0x%x " + "sacloffset 0x%x dacloffset 0x%x", + pntsd->revision, pntsd->type, + pntsd->osidoffset, pntsd->gsidoffset, pntsd->sacloffset, + pntsd->dacloffset)); +#endif + rc = parse_sid(owner_sid_ptr, end_of_acl); + if (rc) + return rc; + + rc = parse_sid(group_sid_ptr, end_of_acl); + if (rc) + return rc; + +/* cifscred->uid = owner_sid_ptr->rid; + cifscred->gid = group_sid_ptr->rid; + memcpy((void *)(&(cifscred->osid)), (void *)owner_sid_ptr, + sizeof (struct cifs_sid)); + memcpy((void *)(&(cifscred->gsid)), (void *)group_sid_ptr, + sizeof (struct cifs_sid)); */ + + num_aces = cpu_to_le32(dacl_ptr->num_aces); + cFYI(1, ("num aces %d", num_aces)); + if (num_aces > 0) { + ppntace = kmalloc(num_aces * sizeof(struct cifs_ntace *), + GFP_KERNEL); + ppace = kmalloc(num_aces * sizeof(struct cifs_ace *), + GFP_KERNEL); + +/* cifscred->cecount = dacl_ptr->num_aces; + cifscred->ntaces = kmalloc(num_aces * + sizeof(struct cifs_ntace *), GFP_KERNEL); + cifscred->aces = kmalloc(num_aces * + sizeof(struct cifs_ace *), GFP_KERNEL);*/ + + acl_base = (char *)dacl_ptr; + acl_size = sizeof(struct cifs_acl); + + for (i = 0; i < num_aces; ++i) { + ppntace[i] = (struct cifs_ntace *) + (acl_base + acl_size); + ppace[i] = (struct cifs_ace *) + ((char *)ppntace[i] + + sizeof(struct cifs_ntace)); + +/* memcpy((void *)(&(cifscred->ntaces[i])), + (void *)ntace_ptrptr[i], + sizeof(struct cifs_ntace)); + memcpy((void *)(&(cifscred->aces[i])), + (void *)ace_ptrptr[i], + sizeof(struct cifs_ace)); */ + + acl_base = (char *)ppntace[i]; + acl_size = cpu_to_le32(ppntace[i]->size); +#ifdef CONFIG_CIFS_DEBUG2 + cFYI(1, ("ACE revision:%d", ppace[i]->revision)); +#endif + } + kfree(ppace); + kfree(ppntace); + } + + return (0); +} -- cgit v1.2.3 From 65874007c36930317c7a56d814a6a3e2966daaa8 Mon Sep 17 00:00:00 2001 From: Steve French Date: Tue, 25 Sep 2007 19:53:44 +0000 Subject: [CIFS] fix cut and paste error - missing defines cause cifsacl build error Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 11ac13336ec..90969104dd3 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -21,6 +21,13 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include +#include "cifspdu.h" +#include "cifsglob.h" +#include "cifsproto.h" +#include "cifs_debug.h" +#include "cifsacl.h" + /* security id for everyone */ static const struct cifs_sid sid_everyone = {1, 1, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0}}; @@ -51,7 +58,7 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl) /* Convert CIFS ACL to POSIX form */ int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len) { - int i; + int i, rc; int num_aces = 0; int acl_size; struct cifs_sid *owner_sid_ptr, *group_sid_ptr; -- cgit v1.2.3 From 4084973dbae9a24e58598d6cdf60f0e5e4a3cabf Mon Sep 17 00:00:00 2001 From: Steve French Date: Mon, 1 Oct 2007 19:59:01 +0000 Subject: [CIFS] change misleading field name num_auth is really num_subauth in ACL terminology Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 90969104dd3..9b84f373af1 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -46,11 +46,11 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl) } #ifdef CONFIG_CIFS_DEBUG2 cFYI(1, ("revision %d num_auth %d First subauth 0x%x", - psid->revision, psid->num_auth, psid->sub_auth[0])); + psid->revision, psid->num_subauth, psid->sub_auth[0])); /* BB add length check to make sure that we do not have huge num auths and therefore go off the end */ - cFYI(1, ("RID 0x%x", le32_to_cpu(psid->sub_auth[psid->num_auth]))); + cFYI(1, ("RID 0x%x", le32_to_cpu(psid->sub_auth[psid->num_subauth]))); #endif return 0; } -- cgit v1.2.3 From d0d66c443aefa51d5dbdd6a1d9b135a2a0e469cc Mon Sep 17 00:00:00 2001 From: Shirish Pargaonkar Date: Wed, 3 Oct 2007 18:22:19 +0000 Subject: [CIFS] CIFS ACL support (part 2) Signed-off-by: Shirish Pargaonkar Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 203 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 147 insertions(+), 56 deletions(-) (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 9b84f373af1..23bff0128e2 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -24,48 +24,178 @@ #include #include "cifspdu.h" #include "cifsglob.h" +#include "cifsacl.h" #include "cifsproto.h" #include "cifs_debug.h" -#include "cifsacl.h" /* security id for everyone */ static const struct cifs_sid sid_everyone = - {1, 1, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0}}; + {1, 1, {0, 0, 0, 0, 0, 0}, {}}; /* group users */ static const struct cifs_sid sid_user = - {1, 2 , {0, 0, 0, 0, 0, 5}, {32, 545, 0, 0}}; + {1, 2 , {0, 0, 0, 0, 0, 5}, {}}; + +static void parse_ace(struct cifs_ace * pace, char * end_of_acl) +{ + int i; + int num_subauth; + __u32 *psub_auth; + + /* validate that we do not go past end of acl */ + if (end_of_acl < (char *)pace + sizeof(struct cifs_ace)) { + cERROR(1, ("ACL too small to parse ACE")); + return; + } + + num_subauth = cpu_to_le32(pace->num_subauth); + if (num_subauth) { + psub_auth = (__u32 *)((char *)pace + sizeof(struct cifs_ace)); +#ifdef CONFIG_CIFS_DEBUG2 + cFYI(1, ("ACE revision %d num_subauth %d", + pace->revision, pace->num_subauth)); + for (i = 0; i < num_subauth; ++i) { + cFYI(1, ("ACE sub_auth[%d]: 0x%x", i, + le32_to_cpu(psub_auth[i]))); + } + + /* BB add length check to make sure that we do not have huge + num auths and therefore go off the end */ + + cFYI(1, ("RID %d", le32_to_cpu(psub_auth[num_subauth-1]))); +#endif + } + + return; +} + +static void parse_ntace(struct cifs_ntace * pntace, char * end_of_acl) +{ + /* validate that we do not go past end of acl */ + if (end_of_acl < (char *)pntace + sizeof(struct cifs_ntace)) { + cERROR(1, ("ACL too small to parse NT ACE")); + return; + } + +#ifdef CONFIG_CIFS_DEBUG2 + cFYI(1, ("NTACE type %d flags 0x%x size %d, access Req 0x%x", + pntace->type, pntace->flags, pntace->size, + pntace->access_req)); +#endif + return; +} + + + +static void parse_dacl(struct cifs_acl * pdacl, char * end_of_acl) +{ + int i; + int num_aces = 0; + int acl_size; + char *acl_base; + struct cifs_ntace **ppntace; + struct cifs_ace **ppace; + + /* BB need to add parm so we can store the SID BB */ + + /* validate that we do not go past end of acl */ + if (end_of_acl < (char *)pdacl + pdacl->size) { + cERROR(1, ("ACL too small to parse DACL")); + return; + } + +#ifdef CONFIG_CIFS_DEBUG2 + cFYI(1, ("DACL revision %d size %d num aces %d", + pdacl->revision, pdacl->size, pdacl->num_aces)); +#endif + + acl_base = (char *)pdacl; + acl_size = sizeof(struct cifs_acl); + + num_aces = cpu_to_le32(pdacl->num_aces); + if (num_aces > 0) { + ppntace = kmalloc(num_aces * sizeof(struct cifs_ntace *), + GFP_KERNEL); + ppace = kmalloc(num_aces * sizeof(struct cifs_ace *), + GFP_KERNEL); + +/* cifscred->cecount = pdacl->num_aces; + cifscred->ntaces = kmalloc(num_aces * + sizeof(struct cifs_ntace *), GFP_KERNEL); + cifscred->aces = kmalloc(num_aces * + sizeof(struct cifs_ace *), GFP_KERNEL);*/ + + + for (i = 0; i < num_aces; ++i) { + ppntace[i] = (struct cifs_ntace *) + (acl_base + acl_size); + ppace[i] = (struct cifs_ace *) ((char *)ppntace[i] + + sizeof(struct cifs_ntace)); + + parse_ntace(ppntace[i], end_of_acl); + parse_ace(ppace[i], end_of_acl); + +/* memcpy((void *)(&(cifscred->ntaces[i])), + (void *)ppntace[i], + sizeof(struct cifs_ntace)); + memcpy((void *)(&(cifscred->aces[i])), + (void *)ppace[i], + sizeof(struct cifs_ace)); */ + + acl_base = (char *)ppntace[i]; + acl_size = cpu_to_le32(ppntace[i]->size); + } + + kfree(ppace); + kfree(ppntace); + } + + return; +} + static int parse_sid(struct cifs_sid *psid, char *end_of_acl) { + int i; + int num_subauth; + __u32 *psub_auth; + /* BB need to add parm so we can store the SID BB */ /* validate that we do not go past end of acl */ if (end_of_acl < (char *)psid + sizeof(struct cifs_sid)) { - cERROR(1, ("ACL to small to parse SID")); + cERROR(1, ("ACL too small to parse SID")); return -EINVAL; } + + num_subauth = cpu_to_le32(psid->num_subauth); + if (num_subauth) { + psub_auth = (__u32 *)((char *)psid + sizeof(struct cifs_sid)); #ifdef CONFIG_CIFS_DEBUG2 - cFYI(1, ("revision %d num_auth %d First subauth 0x%x", - psid->revision, psid->num_subauth, psid->sub_auth[0])); + cFYI(1, ("SID revision %d num_auth %d First subauth 0x%x", + psid->revision, psid->num_subauth, psid->sub_auth[0])); - /* BB add length check to make sure that we do not have huge num auths - and therefore go off the end */ - cFYI(1, ("RID 0x%x", le32_to_cpu(psid->sub_auth[psid->num_subauth]))); + for (i = 0; i < num_subauth; ++i) { + cFYI(1, ("SID sub_auth[%d]: 0x%x ", i, + le32_to_cpu(psub_auth[i]))); + } + + /* BB add length check to make sure that we do not have huge + num auths and therefore go off the end */ + cFYI(1, ("RID 0x%x", + le32_to_cpu(psid->sub_auth[psid->num_subauth]))); #endif + } + return 0; } + /* Convert CIFS ACL to POSIX form */ int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len) { - int i, rc; - int num_aces = 0; - int acl_size; + int rc; struct cifs_sid *owner_sid_ptr, *group_sid_ptr; struct cifs_acl *dacl_ptr; /* no need for SACL ptr */ - struct cifs_ntace **ppntace; - struct cifs_ace **ppace; - char *acl_base; char *end_of_acl = ((char *)pntsd) + acl_len; owner_sid_ptr = (struct cifs_sid *)((char *)pntsd + @@ -89,6 +219,8 @@ int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len) if (rc) return rc; + parse_dacl(dacl_ptr, end_of_acl); + /* cifscred->uid = owner_sid_ptr->rid; cifscred->gid = group_sid_ptr->rid; memcpy((void *)(&(cifscred->osid)), (void *)owner_sid_ptr, @@ -96,46 +228,5 @@ int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len) memcpy((void *)(&(cifscred->gsid)), (void *)group_sid_ptr, sizeof (struct cifs_sid)); */ - num_aces = cpu_to_le32(dacl_ptr->num_aces); - cFYI(1, ("num aces %d", num_aces)); - if (num_aces > 0) { - ppntace = kmalloc(num_aces * sizeof(struct cifs_ntace *), - GFP_KERNEL); - ppace = kmalloc(num_aces * sizeof(struct cifs_ace *), - GFP_KERNEL); - -/* cifscred->cecount = dacl_ptr->num_aces; - cifscred->ntaces = kmalloc(num_aces * - sizeof(struct cifs_ntace *), GFP_KERNEL); - cifscred->aces = kmalloc(num_aces * - sizeof(struct cifs_ace *), GFP_KERNEL);*/ - - acl_base = (char *)dacl_ptr; - acl_size = sizeof(struct cifs_acl); - - for (i = 0; i < num_aces; ++i) { - ppntace[i] = (struct cifs_ntace *) - (acl_base + acl_size); - ppace[i] = (struct cifs_ace *) - ((char *)ppntace[i] + - sizeof(struct cifs_ntace)); - -/* memcpy((void *)(&(cifscred->ntaces[i])), - (void *)ntace_ptrptr[i], - sizeof(struct cifs_ntace)); - memcpy((void *)(&(cifscred->aces[i])), - (void *)ace_ptrptr[i], - sizeof(struct cifs_ace)); */ - - acl_base = (char *)ppntace[i]; - acl_size = cpu_to_le32(ppntace[i]->size); -#ifdef CONFIG_CIFS_DEBUG2 - cFYI(1, ("ACE revision:%d", ppace[i]->revision)); -#endif - } - kfree(ppace); - kfree(ppntace); - } - return (0); } -- cgit v1.2.3 From d12fd121afd4f87cbc7675f8f6b651d649534f15 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 3 Oct 2007 19:43:19 +0000 Subject: [CIFS] Cleanup formatting Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 78 +++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 23bff0128e2..52f9cb808fd 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -30,12 +30,12 @@ /* security id for everyone */ static const struct cifs_sid sid_everyone = - {1, 1, {0, 0, 0, 0, 0, 0}, {}}; + {1, 1, {0, 0, 0, 0, 0, 0}, {} }; /* group users */ static const struct cifs_sid sid_user = - {1, 2 , {0, 0, 0, 0, 0, 5}, {}}; + {1, 2 , {0, 0, 0, 0, 0, 5}, {} }; -static void parse_ace(struct cifs_ace * pace, char * end_of_acl) +static void parse_ace(struct cifs_ace *pace, char *end_of_acl) { int i; int num_subauth; @@ -50,27 +50,27 @@ static void parse_ace(struct cifs_ace * pace, char * end_of_acl) num_subauth = cpu_to_le32(pace->num_subauth); if (num_subauth) { psub_auth = (__u32 *)((char *)pace + sizeof(struct cifs_ace)); -#ifdef CONFIG_CIFS_DEBUG2 - cFYI(1, ("ACE revision %d num_subauth %d", - pace->revision, pace->num_subauth)); - for (i = 0; i < num_subauth; ++i) { - cFYI(1, ("ACE sub_auth[%d]: 0x%x", i, - le32_to_cpu(psub_auth[i]))); - } - - /* BB add length check to make sure that we do not have huge - num auths and therefore go off the end */ - - cFYI(1, ("RID %d", le32_to_cpu(psub_auth[num_subauth-1]))); -#endif - } - - return; -} - -static void parse_ntace(struct cifs_ntace * pntace, char * end_of_acl) -{ - /* validate that we do not go past end of acl */ +#ifdef CONFIG_CIFS_DEBUG2 + cFYI(1, ("ACE revision %d num_subauth %d", + pace->revision, pace->num_subauth)); + for (i = 0; i < num_subauth; ++i) { + cFYI(1, ("ACE sub_auth[%d]: 0x%x", i, + le32_to_cpu(psub_auth[i]))); + } + + /* BB add length check to make sure that we do not have huge + num auths and therefore go off the end */ + + cFYI(1, ("RID %d", le32_to_cpu(psub_auth[num_subauth-1]))); +#endif + } + + return; +} + +static void parse_ntace(struct cifs_ntace *pntace, char *end_of_acl) +{ + /* validate that we do not go past end of acl */ if (end_of_acl < (char *)pntace + sizeof(struct cifs_ntace)) { cERROR(1, ("ACL too small to parse NT ACE")); return; @@ -86,7 +86,7 @@ static void parse_ntace(struct cifs_ntace * pntace, char * end_of_acl) -static void parse_dacl(struct cifs_acl * pdacl, char * end_of_acl) +static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl) { int i; int num_aces = 0; @@ -118,11 +118,11 @@ static void parse_dacl(struct cifs_acl * pdacl, char * end_of_acl) ppace = kmalloc(num_aces * sizeof(struct cifs_ace *), GFP_KERNEL); -/* cifscred->cecount = pdacl->num_aces; - cifscred->ntaces = kmalloc(num_aces * - sizeof(struct cifs_ntace *), GFP_KERNEL); - cifscred->aces = kmalloc(num_aces * - sizeof(struct cifs_ace *), GFP_KERNEL);*/ +/* cifscred->cecount = pdacl->num_aces; + cifscred->ntaces = kmalloc(num_aces * + sizeof(struct cifs_ntace *), GFP_KERNEL); + cifscred->aces = kmalloc(num_aces * + sizeof(struct cifs_ace *), GFP_KERNEL);*/ for (i = 0; i < num_aces; ++i) { @@ -134,12 +134,12 @@ static void parse_dacl(struct cifs_acl * pdacl, char * end_of_acl) parse_ntace(ppntace[i], end_of_acl); parse_ace(ppace[i], end_of_acl); -/* memcpy((void *)(&(cifscred->ntaces[i])), - (void *)ppntace[i], - sizeof(struct cifs_ntace)); - memcpy((void *)(&(cifscred->aces[i])), - (void *)ppace[i], - sizeof(struct cifs_ace)); */ +/* memcpy((void *)(&(cifscred->ntaces[i])), + (void *)ppntace[i], + sizeof(struct cifs_ntace)); + memcpy((void *)(&(cifscred->aces[i])), + (void *)ppace[i], + sizeof(struct cifs_ace)); */ acl_base = (char *)ppntace[i]; acl_size = cpu_to_le32(ppntace[i]->size); @@ -176,12 +176,12 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl) for (i = 0; i < num_subauth; ++i) { cFYI(1, ("SID sub_auth[%d]: 0x%x ", i, - le32_to_cpu(psub_auth[i]))); + le32_to_cpu(psub_auth[i]))); } - /* BB add length check to make sure that we do not have huge + /* BB add length check to make sure that we do not have huge num auths and therefore go off the end */ - cFYI(1, ("RID 0x%x", + cFYI(1, ("RID 0x%x", le32_to_cpu(psid->sub_auth[psid->num_subauth]))); #endif } -- cgit v1.2.3 From 297647c21f11dc1449f9bdb1601ae43e951bba0b Mon Sep 17 00:00:00 2001 From: Steve French Date: Fri, 12 Oct 2007 04:11:59 +0000 Subject: [CIFS] CIFS ACL support part 3 Signed-off-by: Shirish Pargaonkar Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 110 insertions(+), 10 deletions(-) (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 52f9cb808fd..43ab26fff39 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -28,6 +28,20 @@ #include "cifsproto.h" #include "cifs_debug.h" + +#ifdef CONFIG_CIFS_EXPERIMENTAL + +struct cifs_wksid wksidarr[NUM_WK_SIDS] = { + {{1, 0, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0} }, "null user"}, + {{1, 1, {0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0} }, "nobody"}, + {{1, 1, {0, 0, 0, 0, 0, 5}, {11, 0, 0, 0, 0} }, "net-users"}, + {{1, 1, {0, 0, 0, 0, 0, 5}, {18, 0, 0, 0, 0} }, "sys"}, + {{1, 2, {0, 0, 0, 0, 0, 5}, {32, 544, 0, 0, 0} }, "root"}, + {{1, 2, {0, 0, 0, 0, 0, 5}, {32, 545, 0, 0, 0} }, "users"}, + {{1, 2, {0, 0, 0, 0, 0, 5}, {32, 546, 0, 0, 0} }, "guest"} +}; + + /* security id for everyone */ static const struct cifs_sid sid_everyone = {1, 1, {0, 0, 0, 0, 0, 0}, {} }; @@ -35,33 +49,113 @@ static const struct cifs_sid sid_everyone = static const struct cifs_sid sid_user = {1, 2 , {0, 0, 0, 0, 0, 5}, {} }; + +int match_sid(struct cifs_sid *ctsid) +{ + int i, j; + int num_subauth, num_sat, num_saw; + struct cifs_sid *cwsid; + + if (!ctsid) + return (-1); + + for (i = 0; i < NUM_WK_SIDS; ++i) { + cwsid = &(wksidarr[i].cifssid); + + /* compare the revision */ + if (ctsid->revision != cwsid->revision) + continue; + + /* compare all of the six auth values */ + for (j = 0; j < 6; ++j) { + if (ctsid->authority[j] != cwsid->authority[j]) + break; + } + if (j < 6) + continue; /* all of the auth values did not match */ + + /* compare all of the subauth values if any */ + num_sat = cpu_to_le32(ctsid->num_subauth); + num_saw = cpu_to_le32(cwsid->num_subauth); + num_subauth = num_sat < num_saw ? num_sat : num_saw; + if (num_subauth) { + for (j = 0; j < num_subauth; ++j) { + if (ctsid->sub_auth[j] != cwsid->sub_auth[j]) + break; + } + if (j < num_subauth) + continue; /* all sub_auth values do not match */ + } + + cFYI(1, ("matching sid: %s\n", wksidarr[i].sidname)); + return (0); /* sids compare/match */ + } + + cFYI(1, ("No matching sid")); + return (-1); +} + + +int compare_sids(struct cifs_sid *ctsid, struct cifs_sid *cwsid) +{ + int i; + int num_subauth, num_sat, num_saw; + + if ((!ctsid) || (!cwsid)) + return (-1); + + /* compare the revision */ + if (ctsid->revision != cwsid->revision) + return (-1); + + /* compare all of the six auth values */ + for (i = 0; i < 6; ++i) { + if (ctsid->authority[i] != cwsid->authority[i]) + return (-1); + } + + /* compare all of the subauth values if any */ + num_sat = cpu_to_le32(ctsid->num_subauth); + num_saw = cpu_to_le32(cwsid->num_subauth); + num_subauth = num_sat < num_saw ? num_sat : num_saw; + if (num_subauth) { + for (i = 0; i < num_subauth; ++i) { + if (ctsid->sub_auth[i] != cwsid->sub_auth[i]) + return (-1); + } + } + + return (0); /* sids compare/match */ +} + + static void parse_ace(struct cifs_ace *pace, char *end_of_acl) { int i; int num_subauth; - __u32 *psub_auth; /* validate that we do not go past end of acl */ + + /* XXX this if statement can be removed if (end_of_acl < (char *)pace + sizeof(struct cifs_ace)) { cERROR(1, ("ACL too small to parse ACE")); return; - } + } */ num_subauth = cpu_to_le32(pace->num_subauth); if (num_subauth) { - psub_auth = (__u32 *)((char *)pace + sizeof(struct cifs_ace)); #ifdef CONFIG_CIFS_DEBUG2 cFYI(1, ("ACE revision %d num_subauth %d", pace->revision, pace->num_subauth)); for (i = 0; i < num_subauth; ++i) { cFYI(1, ("ACE sub_auth[%d]: 0x%x", i, - le32_to_cpu(psub_auth[i]))); + le32_to_cpu(pace->sub_auth[i]))); } /* BB add length check to make sure that we do not have huge num auths and therefore go off the end */ - cFYI(1, ("RID %d", le32_to_cpu(psub_auth[num_subauth-1]))); + cFYI(1, ("RID %d", le32_to_cpu(pace->sub_auth[num_subauth-1]))); #endif } @@ -132,7 +226,13 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl) sizeof(struct cifs_ntace)); parse_ntace(ppntace[i], end_of_acl); - parse_ace(ppace[i], end_of_acl); + if (end_of_acl < ((char *)ppace[i] + + (ppntace[i]->size - + sizeof(struct cifs_ntace)))) { + cERROR(1, ("ACL too small to parse ACE")); + break; + } else + parse_ace(ppace[i], end_of_acl); /* memcpy((void *)(&(cifscred->ntaces[i])), (void *)ppntace[i], @@ -157,7 +257,6 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl) { int i; int num_subauth; - __u32 *psub_auth; /* BB need to add parm so we can store the SID BB */ @@ -169,20 +268,19 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl) num_subauth = cpu_to_le32(psid->num_subauth); if (num_subauth) { - psub_auth = (__u32 *)((char *)psid + sizeof(struct cifs_sid)); #ifdef CONFIG_CIFS_DEBUG2 cFYI(1, ("SID revision %d num_auth %d First subauth 0x%x", psid->revision, psid->num_subauth, psid->sub_auth[0])); for (i = 0; i < num_subauth; ++i) { cFYI(1, ("SID sub_auth[%d]: 0x%x ", i, - le32_to_cpu(psub_auth[i]))); + le32_to_cpu(psid->sub_auth[i]))); } /* BB add length check to make sure that we do not have huge num auths and therefore go off the end */ cFYI(1, ("RID 0x%x", - le32_to_cpu(psid->sub_auth[psid->num_subauth]))); + le32_to_cpu(psid->sub_auth[num_subauth-1]))); #endif } @@ -228,5 +326,7 @@ int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len) memcpy((void *)(&(cifscred->gsid)), (void *)group_sid_ptr, sizeof (struct cifs_sid)); */ + return (0); } +#endif /* CONFIG_CIFS_EXPERIMENTAL */ -- cgit v1.2.3 From 8f18c1316b71df76bb7076c392134864a18636c1 Mon Sep 17 00:00:00 2001 From: Steve French Date: Fri, 12 Oct 2007 18:54:12 +0000 Subject: [CIFS] remove compile warnings when debug disabled Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 43ab26fff39..601587724f9 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -131,7 +131,6 @@ int compare_sids(struct cifs_sid *ctsid, struct cifs_sid *cwsid) static void parse_ace(struct cifs_ace *pace, char *end_of_acl) { - int i; int num_subauth; /* validate that we do not go past end of acl */ @@ -145,6 +144,7 @@ static void parse_ace(struct cifs_ace *pace, char *end_of_acl) num_subauth = cpu_to_le32(pace->num_subauth); if (num_subauth) { #ifdef CONFIG_CIFS_DEBUG2 + int i; cFYI(1, ("ACE revision %d num_subauth %d", pace->revision, pace->num_subauth)); for (i = 0; i < num_subauth; ++i) { @@ -255,7 +255,6 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl) static int parse_sid(struct cifs_sid *psid, char *end_of_acl) { - int i; int num_subauth; /* BB need to add parm so we can store the SID BB */ @@ -269,6 +268,7 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl) num_subauth = cpu_to_le32(psid->num_subauth); if (num_subauth) { #ifdef CONFIG_CIFS_DEBUG2 + int i; cFYI(1, ("SID revision %d num_auth %d First subauth 0x%x", psid->revision, psid->num_subauth, psid->sub_auth[0])); -- cgit v1.2.3 From af6f4612fdfd782c6d35272836a2b97e7e5b790e Mon Sep 17 00:00:00 2001 From: Steve French Date: Tue, 16 Oct 2007 18:40:37 +0000 Subject: [CIFS] Fix some endianness problems in new acl code Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 601587724f9..4735e9b4759 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -31,7 +31,7 @@ #ifdef CONFIG_CIFS_EXPERIMENTAL -struct cifs_wksid wksidarr[NUM_WK_SIDS] = { +static struct cifs_wksid wksidarr[NUM_WK_SIDS] = { {{1, 0, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0} }, "null user"}, {{1, 1, {0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0} }, "nobody"}, {{1, 1, {0, 0, 0, 0, 0, 5}, {11, 0, 0, 0, 0} }, "net-users"}, @@ -192,14 +192,15 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl) /* BB need to add parm so we can store the SID BB */ /* validate that we do not go past end of acl */ - if (end_of_acl < (char *)pdacl + pdacl->size) { + if (end_of_acl < (char *)pdacl + le16_to_cpu(pdacl->size)) { cERROR(1, ("ACL too small to parse DACL")); return; } #ifdef CONFIG_CIFS_DEBUG2 cFYI(1, ("DACL revision %d size %d num aces %d", - pdacl->revision, pdacl->size, pdacl->num_aces)); + le16_to_cpu(pdacl->revision), le16_to_cpu(pdacl->size), + le32_to_cpu(pdacl->num_aces))); #endif acl_base = (char *)pdacl; @@ -255,7 +256,6 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl) static int parse_sid(struct cifs_sid *psid, char *end_of_acl) { - int num_subauth; /* BB need to add parm so we can store the SID BB */ @@ -265,14 +265,13 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl) return -EINVAL; } - num_subauth = cpu_to_le32(psid->num_subauth); - if (num_subauth) { + if (psid->num_subauth) { #ifdef CONFIG_CIFS_DEBUG2 int i; cFYI(1, ("SID revision %d num_auth %d First subauth 0x%x", psid->revision, psid->num_subauth, psid->sub_auth[0])); - for (i = 0; i < num_subauth; ++i) { + for (i = 0; i < psid->num_subauth; i++) { cFYI(1, ("SID sub_auth[%d]: 0x%x ", i, le32_to_cpu(psid->sub_auth[i]))); } @@ -280,7 +279,7 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl) /* BB add length check to make sure that we do not have huge num auths and therefore go off the end */ cFYI(1, ("RID 0x%x", - le32_to_cpu(psid->sub_auth[num_subauth-1]))); + le32_to_cpu(psid->sub_auth[psid->num_subauth-1]))); #endif } @@ -297,17 +296,18 @@ int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len) char *end_of_acl = ((char *)pntsd) + acl_len; owner_sid_ptr = (struct cifs_sid *)((char *)pntsd + - cpu_to_le32(pntsd->osidoffset)); + le32_to_cpu(pntsd->osidoffset)); group_sid_ptr = (struct cifs_sid *)((char *)pntsd + - cpu_to_le32(pntsd->gsidoffset)); + le32_to_cpu(pntsd->gsidoffset)); dacl_ptr = (struct cifs_acl *)((char *)pntsd + - cpu_to_le32(pntsd->dacloffset)); + le32_to_cpu(pntsd->dacloffset)); #ifdef CONFIG_CIFS_DEBUG2 cFYI(1, ("revision %d type 0x%x ooffset 0x%x goffset 0x%x " "sacloffset 0x%x dacloffset 0x%x", - pntsd->revision, pntsd->type, - pntsd->osidoffset, pntsd->gsidoffset, pntsd->sacloffset, - pntsd->dacloffset)); + pntsd->revision, pntsd->type, le32_to_cpu(pntsd->osidoffset), + le32_to_cpu(pntsd->gsidoffset), + le32_to_cpu(pntsd->sacloffset), + le32_to_cpu(pntsd->dacloffset)); #endif rc = parse_sid(owner_sid_ptr, end_of_acl); if (rc) -- cgit v1.2.3 From ce51ae14ae141eacecf2801f9a3646a737ce64a0 Mon Sep 17 00:00:00 2001 From: Dave Kleikamp Date: Tue, 16 Oct 2007 21:35:39 +0000 Subject: [CIFS] endian fixes in new acl code Signed-off-by: Dave Kleikamp Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 4735e9b4759..9c4a29690cc 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -34,11 +34,11 @@ static struct cifs_wksid wksidarr[NUM_WK_SIDS] = { {{1, 0, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0} }, "null user"}, {{1, 1, {0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0} }, "nobody"}, - {{1, 1, {0, 0, 0, 0, 0, 5}, {11, 0, 0, 0, 0} }, "net-users"}, - {{1, 1, {0, 0, 0, 0, 0, 5}, {18, 0, 0, 0, 0} }, "sys"}, - {{1, 2, {0, 0, 0, 0, 0, 5}, {32, 544, 0, 0, 0} }, "root"}, - {{1, 2, {0, 0, 0, 0, 0, 5}, {32, 545, 0, 0, 0} }, "users"}, - {{1, 2, {0, 0, 0, 0, 0, 5}, {32, 546, 0, 0, 0} }, "guest"} + {{1, 1, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(11), 0, 0, 0, 0} }, "net-users"}, + {{1, 1, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(18), 0, 0, 0, 0} }, "sys"}, + {{1, 2, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(32), cpu_to_le32(544), 0, 0, 0} }, "root"}, + {{1, 2, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(32), cpu_to_le32(545), 0, 0, 0} }, "users"}, + {{1, 2, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(32), cpu_to_le32(546), 0, 0, 0} }, "guest"} }; @@ -75,8 +75,8 @@ int match_sid(struct cifs_sid *ctsid) continue; /* all of the auth values did not match */ /* compare all of the subauth values if any */ - num_sat = cpu_to_le32(ctsid->num_subauth); - num_saw = cpu_to_le32(cwsid->num_subauth); + num_sat = ctsid->num_subauth; + num_saw = cwsid->num_subauth; num_subauth = num_sat < num_saw ? num_sat : num_saw; if (num_subauth) { for (j = 0; j < num_subauth; ++j) { @@ -141,7 +141,7 @@ static void parse_ace(struct cifs_ace *pace, char *end_of_acl) return; } */ - num_subauth = cpu_to_le32(pace->num_subauth); + num_subauth = pace->num_subauth; if (num_subauth) { #ifdef CONFIG_CIFS_DEBUG2 int i; @@ -228,7 +228,7 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl) parse_ntace(ppntace[i], end_of_acl); if (end_of_acl < ((char *)ppace[i] + - (ppntace[i]->size - + (le16_to_cpu(ppntace[i]->size) - sizeof(struct cifs_ntace)))) { cERROR(1, ("ACL too small to parse ACE")); break; @@ -243,7 +243,7 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl) sizeof(struct cifs_ace)); */ acl_base = (char *)ppntace[i]; - acl_size = cpu_to_le32(ppntace[i]->size); + acl_size = le16_to_cpu(ppntace[i]->size); } kfree(ppace); @@ -307,7 +307,7 @@ int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len) pntsd->revision, pntsd->type, le32_to_cpu(pntsd->osidoffset), le32_to_cpu(pntsd->gsidoffset), le32_to_cpu(pntsd->sacloffset), - le32_to_cpu(pntsd->dacloffset)); + le32_to_cpu(pntsd->dacloffset))); #endif rc = parse_sid(owner_sid_ptr, end_of_acl); if (rc) -- cgit v1.2.3 From adbc03587c17e8f50478c1d7744a454cfb9e0653 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 17 Oct 2007 02:12:46 +0000 Subject: [CIFS] endian fixes Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 9c4a29690cc..b1f448f2e07 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -115,8 +115,8 @@ int compare_sids(struct cifs_sid *ctsid, struct cifs_sid *cwsid) } /* compare all of the subauth values if any */ - num_sat = cpu_to_le32(ctsid->num_subauth); - num_saw = cpu_to_le32(cwsid->num_subauth); + num_sat = ctsid->num_subauth; + num_saw = cwsid->num_subauth); num_subauth = num_sat < num_saw ? num_sat : num_saw; if (num_subauth) { for (i = 0; i < num_subauth; ++i) { @@ -206,7 +206,7 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl) acl_base = (char *)pdacl; acl_size = sizeof(struct cifs_acl); - num_aces = cpu_to_le32(pdacl->num_aces); + num_aces = le32_to_cpu(pdacl->num_aces); if (num_aces > 0) { ppntace = kmalloc(num_aces * sizeof(struct cifs_ntace *), GFP_KERNEL); -- cgit v1.2.3 From adddd49ddf4ce5a5997f0695b194587290ea72e9 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 17 Oct 2007 02:48:17 +0000 Subject: [CIFS] build break Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index b1f448f2e07..c46f26bcd8b 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -116,7 +116,7 @@ int compare_sids(struct cifs_sid *ctsid, struct cifs_sid *cwsid) /* compare all of the subauth values if any */ num_sat = ctsid->num_subauth; - num_saw = cwsid->num_subauth); + num_saw = cwsid->num_subauth; num_subauth = num_sat < num_saw ? num_sat : num_saw; if (num_subauth) { for (i = 0; i < num_subauth; ++i) { -- cgit v1.2.3 From a750e77c21d75abd26fbbde2e104fd406566b6e5 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 17 Oct 2007 22:50:39 +0000 Subject: [CIFS] acl support part 4 Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index c46f26bcd8b..ecd6da9e9d3 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -95,23 +95,24 @@ int match_sid(struct cifs_sid *ctsid) return (-1); } - +/* if the two SIDs (roughly equivalent to a UUID for a user or group) are + the same returns 1, if they do not match returns 0 */ int compare_sids(struct cifs_sid *ctsid, struct cifs_sid *cwsid) { int i; int num_subauth, num_sat, num_saw; if ((!ctsid) || (!cwsid)) - return (-1); + return (0); /* compare the revision */ if (ctsid->revision != cwsid->revision) - return (-1); + return (0); /* compare all of the six auth values */ for (i = 0; i < 6; ++i) { if (ctsid->authority[i] != cwsid->authority[i]) - return (-1); + return (0); } /* compare all of the subauth values if any */ @@ -121,11 +122,11 @@ int compare_sids(struct cifs_sid *ctsid, struct cifs_sid *cwsid) if (num_subauth) { for (i = 0; i < num_subauth; ++i) { if (ctsid->sub_auth[i] != cwsid->sub_auth[i]) - return (-1); + return (0); } } - return (0); /* sids compare/match */ + return (1); /* sids compare/match */ } @@ -180,7 +181,8 @@ static void parse_ntace(struct cifs_ntace *pntace, char *end_of_acl) -static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl) +static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl, + struct cifs_sid *pownersid, struct cifs_sid pgrpsid) { int i; int num_aces = 0; @@ -219,7 +221,6 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl) cifscred->aces = kmalloc(num_aces * sizeof(struct cifs_ace *), GFP_KERNEL);*/ - for (i = 0; i < num_aces; ++i) { ppntace[i] = (struct cifs_ntace *) (acl_base + acl_size); @@ -317,7 +318,7 @@ int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len) if (rc) return rc; - parse_dacl(dacl_ptr, end_of_acl); + parse_dacl(dacl_ptr, end_of_acl, owner_sid_ptr, group_sid_ptr); /* cifscred->uid = owner_sid_ptr->rid; cifscred->gid = group_sid_ptr->rid; -- cgit v1.2.3 From d628ddb62d3050e8e474aa3566bc6bafbe4b9c26 Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 17 Oct 2007 23:06:07 +0000 Subject: [CIFS] fix typo Signed-off-by: Steve French --- fs/cifs/cifsacl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/cifs/cifsacl.c') diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index ecd6da9e9d3..e8e56353f5a 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -182,7 +182,7 @@ static void parse_ntace(struct cifs_ntace *pntace, char *end_of_acl) static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl, - struct cifs_sid *pownersid, struct cifs_sid pgrpsid) + struct cifs_sid *pownersid, struct cifs_sid *pgrpsid) { int i; int num_aces = 0; -- cgit v1.2.3