diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-12-03 06:05:31 -0500 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2012-12-08 22:04:35 -0600 |
commit | 7ee0b4c635c091eb3c805977ba886bae2fd33f0c (patch) | |
tree | 92a8dcfefe7d6651886d894caba9dafafd9c59a7 /fs/cifs/cifsacl.h | |
parent | 2ae03025d520de581fd1c58e98bbf3045c0f4695 (diff) | |
download | linux-stable-7ee0b4c635c091eb3c805977ba886bae2fd33f0c.tar.gz linux-stable-7ee0b4c635c091eb3c805977ba886bae2fd33f0c.tar.bz2 linux-stable-7ee0b4c635c091eb3c805977ba886bae2fd33f0c.zip |
cifs: fix hardcoded default security descriptor length
It was hardcoded to 192 bytes, which was not enough when the max number
of subauthorities went to 15. Redefine this constant in terms of sizeof
the structs involved, and rename it for better clarity.
While we're at it, remove a couple more unused constants from cifsacl.h.
Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifsacl.h')
-rw-r--r-- | fs/cifs/cifsacl.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/cifs/cifsacl.h b/fs/cifs/cifsacl.h index 46cd444ea2f2..a445405f80d0 100644 --- a/fs/cifs/cifsacl.h +++ b/fs/cifs/cifsacl.h @@ -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 @@ -43,6 +40,14 @@ #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: * * The fields are unsigned values in decimal. So: |