Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53956
b: refs/heads/master
c: 5268df2
h: refs/heads/master
v: v3
  • Loading branch information
Steve French committed Apr 6, 2007
1 parent 230f448 commit f31a527
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3a9f462f6d07ab6f26a347120e173e945139befd
refs/heads/master: 5268df2ead6def933ace27ab4d46f67d2989b905
5 changes: 4 additions & 1 deletion trunk/fs/cifs/CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ from read-only back to read-write, reflect this change in default file mode
(we had been leaving a file's mode read-only until the inode were reloaded).
Allow setting of attribute back to ATTR_NORMAL (removing readonly dos attribute
when archive dos attribute not set and we are changing mode back to writeable
on server which does not support the Unix Extensions).
on server which does not support the Unix Extensions). Remove read only dos
attribute on chmod when adding any write permission (ie on any of
user/group/other (not all of user/group/other ie 0222) when
mounted to windows.

Version 1.47
------------
Expand Down
22 changes: 11 additions & 11 deletions trunk/fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,17 +1339,17 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
cpu_to_le32(cifsInode->cifsAttrs |
ATTR_READONLY);
}
} else if ((mode & S_IWUGO) == S_IWUGO) {
if (cifsInode->cifsAttrs & ATTR_READONLY) {
set_dosattr = TRUE;
time_buf.Attributes =
cpu_to_le32(cifsInode->cifsAttrs &
(~ATTR_READONLY));
/* Windows ignores set to zero */
if(time_buf.Attributes == 0)
time_buf.Attributes |=
cpu_to_le32(ATTR_NORMAL);
}
} else if (cifsInode->cifsAttrs & ATTR_READONLY) {
/* If file is readonly on server, we would
not be able to write to it - so if any write
bit is enabled for user or group or other we
need to at least try to remove r/o dos attr */
set_dosattr = TRUE;
time_buf.Attributes = cpu_to_le32(cifsInode->cifsAttrs &
(~ATTR_READONLY));
/* Windows ignores set to zero */
if(time_buf.Attributes == 0)
time_buf.Attributes |= cpu_to_le32(ATTR_NORMAL);
}
/* BB to be implemented -
via Windows security descriptors or streams */
Expand Down

0 comments on commit f31a527

Please sign in to comment.