aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-12-31 02:47:21 -0500
committerSteve French <sfrench@us.ibm.com>2007-12-31 02:47:21 -0500
commit97837582bc1e191d2792af74c1f3762ed01243b9 (patch)
treec472591913d02cc4fb107815c53221044fdc9a6c /fs/cifs/inode.c
parent28c5a02a11f70bb1fd8dd3b633206e2db3220308 (diff)
[CIFS] Allow setting mode via cifs acl
Requires cifsacl mount flag to be on and CIFS_EXPERIMENTAL enabled CC: Shirish Pargaonkar <shirishp@us.ibm.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index e915eb1d2e66..fdc0fe109d7b 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1607,7 +1607,13 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1607 CIFS_MOUNT_MAP_SPECIAL_CHR); 1607 CIFS_MOUNT_MAP_SPECIAL_CHR);
1608 else if (attrs->ia_valid & ATTR_MODE) { 1608 else if (attrs->ia_valid & ATTR_MODE) {
1609 rc = 0; 1609 rc = 0;
1610#ifdef CONFIG_CIFS_EXPERIMENTAL
1611 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL)
1612 rc = mode_to_acl(direntry->d_inode, full_path, mode);
1613 else if ((mode & S_IWUGO) == 0) /* not writeable */ {
1614#else
1610 if ((mode & S_IWUGO) == 0) /* not writeable */ { 1615 if ((mode & S_IWUGO) == 0) /* not writeable */ {
1616#endif
1611 if ((cifsInode->cifsAttrs & ATTR_READONLY) == 0) { 1617 if ((cifsInode->cifsAttrs & ATTR_READONLY) == 0) {
1612 set_dosattr = TRUE; 1618 set_dosattr = TRUE;
1613 time_buf.Attributes = 1619 time_buf.Attributes =
@@ -1626,10 +1632,10 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs)
1626 if (time_buf.Attributes == 0) 1632 if (time_buf.Attributes == 0)
1627 time_buf.Attributes |= cpu_to_le32(ATTR_NORMAL); 1633 time_buf.Attributes |= cpu_to_le32(ATTR_NORMAL);
1628 } 1634 }
1629 /* BB to be implemented - 1635#ifdef CONFIG_CIFS_EXPERIMENTAL
1630 via Windows security descriptors or streams */ 1636 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL)
1631 /* CIFSSMBWinSetPerms(xid, pTcon, full_path, mode, uid, gid, 1637 mode_to_acl(direntry->d_inode, full_path, mode);
1632 cifs_sb->local_nls); */ 1638#endif
1633 } 1639 }
1634 1640
1635 if (attrs->ia_valid & ATTR_ATIME) { 1641 if (attrs->ia_valid & ATTR_ATIME) {