aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2009-07-09 01:46:44 -0400
committerSteve French <sfrench@us.ibm.com>2009-07-09 19:06:04 -0400
commitd0c280d26de9422c9c943f8f486b9830cd9bea70 (patch)
tree1f2a3471b6d22ace11d954ddd480db539ff69939 /fs
parentaeaaf253c4dee7ff9af2f3f0595f3bb66964e944 (diff)
cifs: when ATTR_READONLY is set, only clear write bits on non-directories
cifs: when ATTR_READONLY is set, only clear write bits on non-directories On windows servers, ATTR_READONLY apparently either has no meaning or serves as some sort of queue to certain applications for unrelated behavior. This MS kbase article has details: http://support.microsoft.com/kb/326549/ Don't clear the write bits directory mode when ATTR_READONLY is set. Reported-by: pouchat@peewiki.net Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/inode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index a807397f444e..18afe57b2461 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -419,11 +419,11 @@ cifs_all_info_to_fattr(struct cifs_fattr *fattr, FILE_ALL_INFO *info,
419 } else { 419 } else {
420 fattr->cf_mode = S_IFREG | cifs_sb->mnt_file_mode; 420 fattr->cf_mode = S_IFREG | cifs_sb->mnt_file_mode;
421 fattr->cf_dtype = DT_REG; 421 fattr->cf_dtype = DT_REG;
422 }
423 422
424 /* clear write bits if ATTR_READONLY is set */ 423 /* clear write bits if ATTR_READONLY is set */
425 if (fattr->cf_cifsattrs & ATTR_READONLY) 424 if (fattr->cf_cifsattrs & ATTR_READONLY)
426 fattr->cf_mode &= ~(S_IWUGO); 425 fattr->cf_mode &= ~(S_IWUGO);
426 }
427 427
428 fattr->cf_nlink = le32_to_cpu(info->NumberOfLinks); 428 fattr->cf_nlink = le32_to_cpu(info->NumberOfLinks);
429 429