From f2156d35c9584a4afdb71de4bc24b3fef674a63d Mon Sep 17 00:00:00 2001 From: Shyam Prasad N Date: Mon, 9 Nov 2020 06:12:49 -0800 Subject: cifs: Enable sticky bit with cifsacl mount option. For the cifsacl mount option, we did not support sticky bits. With this patch, we do support it, by setting the DELETE_CHILD perm on the directory only for the owner user. When sticky bit is not enabled, allow DELETE_CHILD perm for everyone. Signed-off-by: Shyam Prasad N Signed-off-by: Steve French --- fs/cifs/cifsacl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fs/cifs/cifsacl.h') diff --git a/fs/cifs/cifsacl.h b/fs/cifs/cifsacl.h index 45665ff87b64..ff7fd0862e28 100644 --- a/fs/cifs/cifsacl.h +++ b/fs/cifs/cifsacl.h @@ -30,6 +30,10 @@ #define WRITE_BIT 0x2 #define EXEC_BIT 0x1 +#define ACL_OWNER_MASK 0700 +#define ACL_GROUP_MASK 0770 +#define ACL_EVERYONE_MASK 0777 + #define UBITSHIFT 6 #define GBITSHIFT 3 -- cgit v1.2.3