cifs: setcifsacl - Send the actual (security descriptor) buffer size instead of the...
authorShirish Pargaonkar <shirishpargaonkar@gmail.com>
Wed, 30 Aug 2017 11:29:52 +0000 (06:29 -0500)
committerJeff Layton <jlayton@samba.org>
Wed, 30 Aug 2017 11:38:57 +0000 (07:38 -0400)
commit48d88f946e72a3a8618498524e61f9053bb565f4
tree66587704ef9babc8bb5cd5b9fb2b9055c977c023
parent99fdae64202116489d92d878fd2ae4f1397b45d2
cifs: setcifsacl - Send the actual (security descriptor) buffer size instead of the pre-allocated size

Some SMB servers such as HDS HNAS (Hitachi NAS) return error
NT Status: STATUS_INVALID_SECURITY_DESCR (0xc0000079)
during set cifs acl operation.

This happens due to mismatch in the size of actual security descriptor
being set versus the size of the security descriptor stated in the request.

Instead of sending allocated buffer size of a security descriptor,
send the actual size of the security descriptor during set cifs acl
operation.

Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
setcifsacl.c