diff options
-rw-r--r-- | fs/cifs/cifsacl.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 4735e9b47590..9c4a29690cca 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c | |||
@@ -34,11 +34,11 @@ | |||
34 | static struct cifs_wksid wksidarr[NUM_WK_SIDS] = { | 34 | static struct cifs_wksid wksidarr[NUM_WK_SIDS] = { |
35 | {{1, 0, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0} }, "null user"}, | 35 | {{1, 0, {0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0} }, "null user"}, |
36 | {{1, 1, {0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0} }, "nobody"}, | 36 | {{1, 1, {0, 0, 0, 0, 0, 1}, {0, 0, 0, 0, 0} }, "nobody"}, |
37 | {{1, 1, {0, 0, 0, 0, 0, 5}, {11, 0, 0, 0, 0} }, "net-users"}, | 37 | {{1, 1, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(11), 0, 0, 0, 0} }, "net-users"}, |
38 | {{1, 1, {0, 0, 0, 0, 0, 5}, {18, 0, 0, 0, 0} }, "sys"}, | 38 | {{1, 1, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(18), 0, 0, 0, 0} }, "sys"}, |
39 | {{1, 2, {0, 0, 0, 0, 0, 5}, {32, 544, 0, 0, 0} }, "root"}, | 39 | {{1, 2, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(32), cpu_to_le32(544), 0, 0, 0} }, "root"}, |
40 | {{1, 2, {0, 0, 0, 0, 0, 5}, {32, 545, 0, 0, 0} }, "users"}, | 40 | {{1, 2, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(32), cpu_to_le32(545), 0, 0, 0} }, "users"}, |
41 | {{1, 2, {0, 0, 0, 0, 0, 5}, {32, 546, 0, 0, 0} }, "guest"} | 41 | {{1, 2, {0, 0, 0, 0, 0, 5}, {cpu_to_le32(32), cpu_to_le32(546), 0, 0, 0} }, "guest"} |
42 | }; | 42 | }; |
43 | 43 | ||
44 | 44 | ||
@@ -75,8 +75,8 @@ int match_sid(struct cifs_sid *ctsid) | |||
75 | continue; /* all of the auth values did not match */ | 75 | continue; /* all of the auth values did not match */ |
76 | 76 | ||
77 | /* compare all of the subauth values if any */ | 77 | /* compare all of the subauth values if any */ |
78 | num_sat = cpu_to_le32(ctsid->num_subauth); | 78 | num_sat = ctsid->num_subauth; |
79 | num_saw = cpu_to_le32(cwsid->num_subauth); | 79 | num_saw = cwsid->num_subauth; |
80 | num_subauth = num_sat < num_saw ? num_sat : num_saw; | 80 | num_subauth = num_sat < num_saw ? num_sat : num_saw; |
81 | if (num_subauth) { | 81 | if (num_subauth) { |
82 | for (j = 0; j < num_subauth; ++j) { | 82 | for (j = 0; j < num_subauth; ++j) { |
@@ -141,7 +141,7 @@ static void parse_ace(struct cifs_ace *pace, char *end_of_acl) | |||
141 | return; | 141 | return; |
142 | } */ | 142 | } */ |
143 | 143 | ||
144 | num_subauth = cpu_to_le32(pace->num_subauth); | 144 | num_subauth = pace->num_subauth; |
145 | if (num_subauth) { | 145 | if (num_subauth) { |
146 | #ifdef CONFIG_CIFS_DEBUG2 | 146 | #ifdef CONFIG_CIFS_DEBUG2 |
147 | int i; | 147 | int i; |
@@ -228,7 +228,7 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl) | |||
228 | 228 | ||
229 | parse_ntace(ppntace[i], end_of_acl); | 229 | parse_ntace(ppntace[i], end_of_acl); |
230 | if (end_of_acl < ((char *)ppace[i] + | 230 | if (end_of_acl < ((char *)ppace[i] + |
231 | (ppntace[i]->size - | 231 | (le16_to_cpu(ppntace[i]->size) - |
232 | sizeof(struct cifs_ntace)))) { | 232 | sizeof(struct cifs_ntace)))) { |
233 | cERROR(1, ("ACL too small to parse ACE")); | 233 | cERROR(1, ("ACL too small to parse ACE")); |
234 | break; | 234 | break; |
@@ -243,7 +243,7 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl) | |||
243 | sizeof(struct cifs_ace)); */ | 243 | sizeof(struct cifs_ace)); */ |
244 | 244 | ||
245 | acl_base = (char *)ppntace[i]; | 245 | acl_base = (char *)ppntace[i]; |
246 | acl_size = cpu_to_le32(ppntace[i]->size); | 246 | acl_size = le16_to_cpu(ppntace[i]->size); |
247 | } | 247 | } |
248 | 248 | ||
249 | kfree(ppace); | 249 | kfree(ppace); |
@@ -307,7 +307,7 @@ int parse_sec_desc(struct cifs_ntsd *pntsd, int acl_len) | |||
307 | pntsd->revision, pntsd->type, le32_to_cpu(pntsd->osidoffset), | 307 | pntsd->revision, pntsd->type, le32_to_cpu(pntsd->osidoffset), |
308 | le32_to_cpu(pntsd->gsidoffset), | 308 | le32_to_cpu(pntsd->gsidoffset), |
309 | le32_to_cpu(pntsd->sacloffset), | 309 | le32_to_cpu(pntsd->sacloffset), |
310 | le32_to_cpu(pntsd->dacloffset)); | 310 | le32_to_cpu(pntsd->dacloffset))); |
311 | #endif | 311 | #endif |
312 | rc = parse_sid(owner_sid_ptr, end_of_acl); | 312 | rc = parse_sid(owner_sid_ptr, end_of_acl); |
313 | if (rc) | 313 | if (rc) |