aboutsummaryrefslogtreecommitdiff
path: root/fs/cifs/cifspdu.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-05-09 22:28:02 +0000
committerSteve French <sfrench@us.ibm.com>2008-05-11 17:45:43 +0000
commit67750fb9e07940c078d1edb16fd736ccc92a4a4e (patch)
treee0f2f224e6b06f02fc7961f7e0e64263a826e8fa /fs/cifs/cifspdu.h
parent02eadeffda169a45946c79270ec19f45eeafb8e7 (diff)
[CIFS] when not using unix extensions, check for and set ATTR_READONLY on create and mkdir
When creating a directory on a CIFS share without POSIX extensions, and the given mode has no write bits set, set the ATTR_READONLY bit. When creating a file, set ATTR_READONLY if the create mode has no write bits set and we're not using unix extensions. There are some comments about this being problematic due to the VFS splitting creates into 2 parts. I'm not sure what that's actually talking about, but I'm assuming that it has something to do with how mknod is implemented. In the simple case where we have no unix extensions and we're just creating a regular file, there's no reason we can't set ATTR_READONLY. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifspdu.h')
-rw-r--r--fs/cifs/cifspdu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
index a0d26b540d4..c43bf4b7a55 100644
--- a/fs/cifs/cifspdu.h
+++ b/fs/cifs/cifspdu.h
@@ -340,6 +340,7 @@
#define OPEN_NO_RECALL 0x00400000
#define OPEN_FREE_SPACE_QUERY 0x00800000 /* should be zero */
#define CREATE_OPTIONS_MASK 0x007FFFFF
+#define CREATE_OPTION_READONLY 0x10000000
#define CREATE_OPTION_SPECIAL 0x20000000 /* system. NB not sent over wire */
/* ImpersonationLevel flags */