summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsacl.c
diff options
context:
space:
mode:
authorJeff Layton2012-12-03 12:05:31 +0100
committerSteve French2012-12-09 05:04:35 +0100
commit7ee0b4c635c091eb3c805977ba886bae2fd33f0c (patch)
tree92a8dcfefe7d6651886d894caba9dafafd9c59a7 /fs/cifs/cifsacl.c
parentcifs: extra sanity checking for cifs.idmap keys (diff)
downloadkernel-qcow2-linux-7ee0b4c635c091eb3c805977ba886bae2fd33f0c.tar.gz
kernel-qcow2-linux-7ee0b4c635c091eb3c805977ba886bae2fd33f0c.tar.xz
kernel-qcow2-linux-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.c')
-rw-r--r--fs/cifs/cifsacl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c
index b0b114acdece..08b4d5022686 100644
--- a/fs/cifs/cifsacl.c
+++ b/fs/cifs/cifsacl.c
@@ -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");