diff options
author | Shirish Pargaonkar <shirishpargaonkar@gmail.com> | 2011-10-13 11:26:03 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2011-10-17 10:11:11 -0400 |
commit | a5ff376966c079bd2f078524eff11b0c63cc2507 (patch) | |
tree | f0a6576a0987ba73589caaadc2b4fde1b24650b5 /fs/cifs/xattr.c | |
parent | d59dad2be038132259ac99a2837d65a87fd90588 (diff) |
cifs: Call id to SID mapping functions to change owner/group (try #4 repost)
Now build security descriptor to change either owner or group at the
server. Initially security descriptor was built to change only
(D)ACL, that functionality has been extended.
When either an Owner or a Group of a file object at the server is changed,
rest of security descriptor remains same (DACL etc.).
To set security descriptor, it is necessary to open that file
with permission bits of either WRITE_DAC if DACL is being modified or
WRITE_OWNER (Take Ownership) if Owner or Group is being changed.
It is the server that decides whether a set security descriptor with
either owner or group change succeeds or not.
Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/xattr.c')
-rw-r--r-- | fs/cifs/xattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c index 2a22fb2989e4..fde15b1a1eb5 100644 --- a/fs/cifs/xattr.c +++ b/fs/cifs/xattr.c | |||
@@ -178,7 +178,7 @@ int cifs_setxattr(struct dentry *direntry, const char *ea_name, | |||
178 | #ifdef CONFIG_CIFS_ACL | 178 | #ifdef CONFIG_CIFS_ACL |
179 | memcpy(pacl, ea_value, value_size); | 179 | memcpy(pacl, ea_value, value_size); |
180 | rc = set_cifs_acl(pacl, value_size, | 180 | rc = set_cifs_acl(pacl, value_size, |
181 | direntry->d_inode, full_path); | 181 | direntry->d_inode, full_path, CIFS_ACL_DACL); |
182 | if (rc == 0) /* force revalidate of the inode */ | 182 | if (rc == 0) /* force revalidate of the inode */ |
183 | CIFS_I(direntry->d_inode)->time = 0; | 183 | CIFS_I(direntry->d_inode)->time = 0; |
184 | kfree(pacl); | 184 | kfree(pacl); |