Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97961
b: refs/heads/master
c: 4ca691a
h: refs/heads/master
i:
  97959: 377051b
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed May 23, 2008
1 parent cafa6d7 commit b347d0d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 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: 4e94a105ed0df78e25b20ff8ed6761f5937662b1
refs/heads/master: 4ca691a892e8ab4f79583de1394f17a7dcfa2b57
27 changes: 20 additions & 7 deletions trunk/fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1546,13 +1546,26 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
} else
goto cifs_setattr_exit;
}
if (attrs->ia_valid & ATTR_UID) {
cFYI(1, ("UID changed to %d", attrs->ia_uid));
uid = attrs->ia_uid;
}
if (attrs->ia_valid & ATTR_GID) {
cFYI(1, ("GID changed to %d", attrs->ia_gid));
gid = attrs->ia_gid;

/*
* Without unix extensions we can't send ownership changes to the
* server, so silently ignore them. This is consistent with how
* local DOS/Windows filesystems behave (VFAT, NTFS, etc). With
* CIFSACL support + proper Windows to Unix idmapping, we may be
* able to support this in the future.
*/
if (!pTcon->unix_ext &&
!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID)) {
attrs->ia_valid &= ~(ATTR_UID | ATTR_GID);
} else {
if (attrs->ia_valid & ATTR_UID) {
cFYI(1, ("UID changed to %d", attrs->ia_uid));
uid = attrs->ia_uid;
}
if (attrs->ia_valid & ATTR_GID) {
cFYI(1, ("GID changed to %d", attrs->ia_gid));
gid = attrs->ia_gid;
}
}

time_buf.Attributes = 0;
Expand Down

0 comments on commit b347d0d

Please sign in to comment.