aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/cifs/cifsacl.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index dabbce00712b..f02fdef463a7 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -269,6 +269,13 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
269 269
270 /* BB need to add parm so we can store the SID BB */ 270 /* BB need to add parm so we can store the SID BB */
271 271
272 if (!pdacl) {
273 /* no DACL in the security descriptor, set
274 all the permissions for user/group/other */
275 inode->i_mode |= S_IRWXUGO;
276 return;
277 }
278
272 /* validate that we do not go past end of acl */ 279 /* validate that we do not go past end of acl */
273 if (end_of_acl < (char *)pdacl + le16_to_cpu(pdacl->size)) { 280 if (end_of_acl < (char *)pdacl + le16_to_cpu(pdacl->size)) {
274 cERROR(1, ("ACL too small to parse DACL")); 281 cERROR(1, ("ACL too small to parse DACL"));
@@ -286,12 +293,6 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
286 user/group/other have no permissions */ 293 user/group/other have no permissions */
287 inode->i_mode &= ~(S_IRWXUGO); 294 inode->i_mode &= ~(S_IRWXUGO);
288 295
289 if (!pdacl) {
290 /* no DACL in the security descriptor, set
291 all the permissions for user/group/other */
292 inode->i_mode |= S_IRWXUGO;
293 return;
294 }
295 acl_base = (char *)pdacl; 296 acl_base = (char *)pdacl;
296 acl_size = sizeof(struct cifs_acl); 297 acl_size = sizeof(struct cifs_acl);
297 298