aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorShirish Pargaonkar <shirishpargaonkar@gmail.com>2011-10-13 11:26:03 -0400
committerSteve French <smfrench@gmail.com>2011-10-17 10:11:11 -0400
commita5ff376966c079bd2f078524eff11b0c63cc2507 (patch)
treef0a6576a0987ba73589caaadc2b4fde1b24650b5 /fs/cifs/cifssmb.c
parentd59dad2be038132259ac99a2837d65a87fd90588 (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/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index e33093f7ef0d..c824c106b2b7 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -3463,7 +3463,7 @@ qsec_out:
3463 3463
3464int 3464int
3465CIFSSMBSetCIFSACL(const int xid, struct cifs_tcon *tcon, __u16 fid, 3465CIFSSMBSetCIFSACL(const int xid, struct cifs_tcon *tcon, __u16 fid,
3466 struct cifs_ntsd *pntsd, __u32 acllen) 3466 struct cifs_ntsd *pntsd, __u32 acllen, int aclflag)
3467{ 3467{
3468 __u16 byte_count, param_count, data_count, param_offset, data_offset; 3468 __u16 byte_count, param_count, data_count, param_offset, data_offset;
3469 int rc = 0; 3469 int rc = 0;
@@ -3500,7 +3500,7 @@ setCifsAclRetry:
3500 3500
3501 pSMB->Fid = fid; /* file handle always le */ 3501 pSMB->Fid = fid; /* file handle always le */
3502 pSMB->Reserved2 = 0; 3502 pSMB->Reserved2 = 0;
3503 pSMB->AclFlags = cpu_to_le32(CIFS_ACL_DACL); 3503 pSMB->AclFlags = cpu_to_le32(aclflag);
3504 3504
3505 if (pntsd && acllen) { 3505 if (pntsd && acllen) {
3506 memcpy((char *) &pSMBr->hdr.Protocol + data_offset, 3506 memcpy((char *) &pSMBr->hdr.Protocol + data_offset,