aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsproto.h
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/cifsproto.h
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/cifsproto.h')
-rw-r--r--fs/cifs/cifsproto.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 94834dbb46da..a1fa9cec05d6 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -146,11 +146,12 @@ extern int cifs_get_inode_info_unix(struct inode **pinode,
146extern int cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb, 146extern int cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb,
147 struct cifs_fattr *fattr, struct inode *inode, 147 struct cifs_fattr *fattr, struct inode *inode,
148 const char *path, const __u16 *pfid); 148 const char *path, const __u16 *pfid);
149extern int mode_to_cifs_acl(struct inode *inode, const char *path, __u64); 149extern int id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64,
150 uid_t, gid_t);
150extern struct cifs_ntsd *get_cifs_acl(struct cifs_sb_info *, struct inode *, 151extern struct cifs_ntsd *get_cifs_acl(struct cifs_sb_info *, struct inode *,
151 const char *, u32 *); 152 const char *, u32 *);
152extern int set_cifs_acl(struct cifs_ntsd *, __u32, struct inode *, 153extern int set_cifs_acl(struct cifs_ntsd *, __u32, struct inode *,
153 const char *); 154 const char *, int);
154 155
155extern void cifs_setup_cifs_sb(struct smb_vol *pvolume_info, 156extern void cifs_setup_cifs_sb(struct smb_vol *pvolume_info,
156 struct cifs_sb_info *cifs_sb); 157 struct cifs_sb_info *cifs_sb);
@@ -420,7 +421,7 @@ extern int CIFSSMBSetEA(const int xid, struct cifs_tcon *tcon,
420extern int CIFSSMBGetCIFSACL(const int xid, struct cifs_tcon *tcon, 421extern int CIFSSMBGetCIFSACL(const int xid, struct cifs_tcon *tcon,
421 __u16 fid, struct cifs_ntsd **acl_inf, __u32 *buflen); 422 __u16 fid, struct cifs_ntsd **acl_inf, __u32 *buflen);
422extern int CIFSSMBSetCIFSACL(const int, struct cifs_tcon *, __u16, 423extern int CIFSSMBSetCIFSACL(const int, struct cifs_tcon *, __u16,
423 struct cifs_ntsd *, __u32); 424 struct cifs_ntsd *, __u32, int);
424extern int CIFSSMBGetPosixACL(const int xid, struct cifs_tcon *tcon, 425extern int CIFSSMBGetPosixACL(const int xid, struct cifs_tcon *tcon,
425 const unsigned char *searchName, 426 const unsigned char *searchName,
426 char *acl_inf, const int buflen, const int acl_type, 427 char *acl_inf, const int buflen, const int acl_type,