aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsacl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifsacl.c')
-rw-r--r--fs/cifs/cifsacl.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index 23bff0128e2a..52f9cb808fd0 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -30,12 +30,12 @@
30 30
31/* security id for everyone */ 31/* security id for everyone */
32static const struct cifs_sid sid_everyone = 32static const struct cifs_sid sid_everyone =
33 {1, 1, {0, 0, 0, 0, 0, 0}, {}}; 33 {1, 1, {0, 0, 0, 0, 0, 0}, {} };
34/* group users */ 34/* group users */
35static const struct cifs_sid sid_user = 35static const struct cifs_sid sid_user =
36 {1, 2 , {0, 0, 0, 0, 0, 5}, {}}; 36 {1, 2 , {0, 0, 0, 0, 0, 5}, {} };
37 37
38static void parse_ace(struct cifs_ace * pace, char * end_of_acl) 38static void parse_ace(struct cifs_ace *pace, char *end_of_acl)
39{ 39{
40 int i; 40 int i;
41 int num_subauth; 41 int num_subauth;
@@ -50,27 +50,27 @@ static void parse_ace(struct cifs_ace * pace, char * end_of_acl)
50 num_subauth = cpu_to_le32(pace->num_subauth); 50 num_subauth = cpu_to_le32(pace->num_subauth);
51 if (num_subauth) { 51 if (num_subauth) {
52 psub_auth = (__u32 *)((char *)pace + sizeof(struct cifs_ace)); 52 psub_auth = (__u32 *)((char *)pace + sizeof(struct cifs_ace));
53#ifdef CONFIG_CIFS_DEBUG2 53#ifdef CONFIG_CIFS_DEBUG2
54 cFYI(1, ("ACE revision %d num_subauth %d", 54 cFYI(1, ("ACE revision %d num_subauth %d",
55 pace->revision, pace->num_subauth)); 55 pace->revision, pace->num_subauth));
56 for (i = 0; i < num_subauth; ++i) { 56 for (i = 0; i < num_subauth; ++i) {
57 cFYI(1, ("ACE sub_auth[%d]: 0x%x", i, 57 cFYI(1, ("ACE sub_auth[%d]: 0x%x", i,
58 le32_to_cpu(psub_auth[i]))); 58 le32_to_cpu(psub_auth[i])));
59 } 59 }
60 60
61 /* BB add length check to make sure that we do not have huge 61 /* BB add length check to make sure that we do not have huge
62 num auths and therefore go off the end */ 62 num auths and therefore go off the end */
63 63
64 cFYI(1, ("RID %d", le32_to_cpu(psub_auth[num_subauth-1]))); 64 cFYI(1, ("RID %d", le32_to_cpu(psub_auth[num_subauth-1])));
65#endif 65#endif
66 } 66 }
67 67
68 return; 68 return;
69} 69}
70 70
71static void parse_ntace(struct cifs_ntace * pntace, char * end_of_acl) 71static void parse_ntace(struct cifs_ntace *pntace, char *end_of_acl)
72{ 72{
73 /* validate that we do not go past end of acl */ 73 /* validate that we do not go past end of acl */
74 if (end_of_acl < (char *)pntace + sizeof(struct cifs_ntace)) { 74 if (end_of_acl < (char *)pntace + sizeof(struct cifs_ntace)) {
75 cERROR(1, ("ACL too small to parse NT ACE")); 75 cERROR(1, ("ACL too small to parse NT ACE"));
76 return; 76 return;
@@ -86,7 +86,7 @@ static void parse_ntace(struct cifs_ntace * pntace, char * end_of_acl)
86 86
87 87
88 88
89static void parse_dacl(struct cifs_acl * pdacl, char * end_of_acl) 89static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl)
90{ 90{
91 int i; 91 int i;
92 int num_aces = 0; 92 int num_aces = 0;
@@ -118,11 +118,11 @@ static void parse_dacl(struct cifs_acl * pdacl, char * end_of_acl)
118 ppace = kmalloc(num_aces * sizeof(struct cifs_ace *), 118 ppace = kmalloc(num_aces * sizeof(struct cifs_ace *),
119 GFP_KERNEL); 119 GFP_KERNEL);
120 120
121/* cifscred->cecount = pdacl->num_aces; 121/* cifscred->cecount = pdacl->num_aces;
122 cifscred->ntaces = kmalloc(num_aces * 122 cifscred->ntaces = kmalloc(num_aces *
123 sizeof(struct cifs_ntace *), GFP_KERNEL); 123 sizeof(struct cifs_ntace *), GFP_KERNEL);
124 cifscred->aces = kmalloc(num_aces * 124 cifscred->aces = kmalloc(num_aces *
125 sizeof(struct cifs_ace *), GFP_KERNEL);*/ 125 sizeof(struct cifs_ace *), GFP_KERNEL);*/
126 126
127 127
128 for (i = 0; i < num_aces; ++i) { 128 for (i = 0; i < num_aces; ++i) {
@@ -134,12 +134,12 @@ static void parse_dacl(struct cifs_acl * pdacl, char * end_of_acl)
134 parse_ntace(ppntace[i], end_of_acl); 134 parse_ntace(ppntace[i], end_of_acl);
135 parse_ace(ppace[i], end_of_acl); 135 parse_ace(ppace[i], end_of_acl);
136 136
137/* memcpy((void *)(&(cifscred->ntaces[i])), 137/* memcpy((void *)(&(cifscred->ntaces[i])),
138 (void *)ppntace[i], 138 (void *)ppntace[i],
139 sizeof(struct cifs_ntace)); 139 sizeof(struct cifs_ntace));
140 memcpy((void *)(&(cifscred->aces[i])), 140 memcpy((void *)(&(cifscred->aces[i])),
141 (void *)ppace[i], 141 (void *)ppace[i],
142 sizeof(struct cifs_ace)); */ 142 sizeof(struct cifs_ace)); */
143 143
144 acl_base = (char *)ppntace[i]; 144 acl_base = (char *)ppntace[i];
145 acl_size = cpu_to_le32(ppntace[i]->size); 145 acl_size = cpu_to_le32(ppntace[i]->size);
@@ -176,12 +176,12 @@ static int parse_sid(struct cifs_sid *psid, char *end_of_acl)
176 176
177 for (i = 0; i < num_subauth; ++i) { 177 for (i = 0; i < num_subauth; ++i) {
178 cFYI(1, ("SID sub_auth[%d]: 0x%x ", i, 178 cFYI(1, ("SID sub_auth[%d]: 0x%x ", i,
179 le32_to_cpu(psub_auth[i]))); 179 le32_to_cpu(psub_auth[i])));
180 } 180 }
181 181
182 /* BB add length check to make sure that we do not have huge 182 /* BB add length check to make sure that we do not have huge
183 num auths and therefore go off the end */ 183 num auths and therefore go off the end */
184 cFYI(1, ("RID 0x%x", 184 cFYI(1, ("RID 0x%x",
185 le32_to_cpu(psid->sub_auth[psid->num_subauth]))); 185 le32_to_cpu(psid->sub_auth[psid->num_subauth])));
186#endif 186#endif
187 } 187 }