Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339484
b: refs/heads/master
c: 7ee0b4c
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Dec 9, 2012
1 parent cb9f7cc commit 110a502
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2ae03025d520de581fd1c58e98bbf3045c0f4695
refs/heads/master: 7ee0b4c635c091eb3c805977ba886bae2fd33f0c
2 changes: 1 addition & 1 deletion trunk/fs/cifs/cifsacl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64 nmode,
* memory for the smb header, set security descriptor request security
* descriptor parameters, and secuirty descriptor itself
*/
secdesclen = max_t(u32, secdesclen, DEFSECDESCLEN);
secdesclen = max_t(u32, secdesclen, DEFAULT_SEC_DESC_LEN);
pnntsd = kmalloc(secdesclen, GFP_KERNEL);
if (!pnntsd) {
cERROR(1, "Unable to allocate security descriptor");
Expand Down
11 changes: 8 additions & 3 deletions trunk/fs/cifs/cifsacl.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@

#define NUM_AUTHS (6) /* number of authority fields */
#define SID_MAX_SUB_AUTHORITIES (15) /* max number of sub authority fields */
#define NUM_WK_SIDS 7 /* number of well known sids */
#define SIDNAMELENGTH 20 /* long enough for the ones we care about */
#define DEFSECDESCLEN 192 /* sec desc len contaiting a dacl with three aces */

#define READ_BIT 0x4
#define WRITE_BIT 0x2
Expand All @@ -42,6 +39,14 @@
#define SIDOWNER 1
#define SIDGROUP 2

/*
* Security Descriptor length containing DACL with 3 ACEs (one each for
* owner, group and world).
*/
#define DEFAULT_SEC_DESC_LEN (sizeof(struct cifs_ntsd) + \
sizeof(struct cifs_acl) + \
(sizeof(struct cifs_ace) * 3))

/*
* Maximum size of a string representation of a SID:
*
Expand Down

0 comments on commit 110a502

Please sign in to comment.