[CIFS] Cleanup formatting

Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
Steve French
2007-10-03 19:43:19 +00:00
parent d0d66c443a
commit d12fd121af
2 changed files with 47 additions and 42 deletions

View File

@@ -30,12 +30,12 @@
/* security id for everyone */ /* security id for everyone */
static const struct cifs_sid sid_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 */ /* group users */
static const struct cifs_sid sid_user = 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 i;
int num_subauth; int num_subauth;
@@ -68,7 +68,7 @@ static void parse_ace(struct cifs_ace * pace, char * end_of_acl)
return; return;
} }
static void parse_ntace(struct cifs_ntace * pntace, char * end_of_acl) static void parse_ntace(struct cifs_ntace *pntace, char *end_of_acl)
{ {
/* validate that we do not go past end of acl */ /* validate that we do not go past end of acl */
if (end_of_acl < (char *)pntace + sizeof(struct cifs_ntace)) { if (end_of_acl < (char *)pntace + sizeof(struct cifs_ntace)) {
@@ -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 i;
int num_aces = 0; 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 *), ppace = kmalloc(num_aces * sizeof(struct cifs_ace *),
GFP_KERNEL); GFP_KERNEL);
/* cifscred->cecount = pdacl->num_aces; /* cifscred->cecount = pdacl->num_aces;
cifscred->ntaces = kmalloc(num_aces * cifscred->ntaces = kmalloc(num_aces *
sizeof(struct cifs_ntace *), GFP_KERNEL); sizeof(struct cifs_ntace *), GFP_KERNEL);
cifscred->aces = kmalloc(num_aces * cifscred->aces = kmalloc(num_aces *
sizeof(struct cifs_ace *), GFP_KERNEL);*/ sizeof(struct cifs_ace *), GFP_KERNEL);*/
for (i = 0; i < num_aces; ++i) { 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_ntace(ppntace[i], end_of_acl);
parse_ace(ppace[i], end_of_acl); parse_ace(ppace[i], end_of_acl);
/* memcpy((void *)(&(cifscred->ntaces[i])), /* memcpy((void *)(&(cifscred->ntaces[i])),
(void *)ppntace[i], (void *)ppntace[i],
sizeof(struct cifs_ntace)); sizeof(struct cifs_ntace));
memcpy((void *)(&(cifscred->aces[i])), memcpy((void *)(&(cifscred->aces[i])),
(void *)ppace[i], (void *)ppace[i],
sizeof(struct cifs_ace)); */ sizeof(struct cifs_ace)); */
acl_base = (char *)ppntace[i]; acl_base = (char *)ppntace[i];
acl_size = cpu_to_le32(ppntace[i]->size); acl_size = cpu_to_le32(ppntace[i]->size);
@@ -176,7 +176,7 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl)
for (i = 0; i < num_subauth; ++i) { for (i = 0; i < num_subauth; ++i) {
cFYI(1, ("SID sub_auth[%d]: 0x%x ", 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

View File

@@ -261,21 +261,26 @@ ssize_t cifs_getxattr(struct dentry *direntry, const char *ea_name,
cifs_sb->local_nls, cifs_sb->local_nls,
cifs_sb->mnt_cifs_flags & cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR); CIFS_MOUNT_MAP_SPECIAL_CHR);
/* else if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) { #ifdef CONFIG_CIFS_EXPERIMENTAL
else if(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) {
__u16 fid; __u16 fid;
int oplock = FALSE; int oplock = FALSE;
rc = CIFSSMBOpen(xid, pTcon, full_path, if (experimEnabled)
FILE_OPEN, GENERIC_READ, 0, &fid, rc = CIFSSMBOpen(xid, pTcon, full_path,
&oplock, NULL, cifs_sb->local_nls, FILE_OPEN, GENERIC_READ, 0, &fid,
cifs_sb->mnt_cifs_flags & &oplock, NULL, cifs_sb->local_nls,
CIFS_MOUNT_MAP_SPECIAL_CHR); cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR);
/* else rc is EOPNOTSUPP from above */
if(rc == 0) { if(rc == 0) {
rc = CIFSSMBGetCIFSACL(xid, pTcon, fid, rc = CIFSSMBGetCIFSACL(xid, pTcon, fid,
ea_value, buf_size, ea_value, buf_size,
ACL_TYPE_ACCESS); ACL_TYPE_ACCESS);
CIFSSMBClose(xid, pTcon, fid); CIFSSMBClose(xid, pTcon, fid);
} }
} */ /* BB enable after fixing up return data */ }
#endif /* EXPERIMENTAL */
#else #else
cFYI(1, ("query POSIX ACL not supported yet")); cFYI(1, ("query POSIX ACL not supported yet"));
#endif /* CONFIG_CIFS_POSIX */ #endif /* CONFIG_CIFS_POSIX */