aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index d904a037c833..fcbdbb6ad7bf 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -974,8 +974,8 @@ mkdir_get_info:
974 * failed to get it from the server or was set bogus */ 974 * failed to get it from the server or was set bogus */
975 if ((direntry->d_inode) && (direntry->d_inode->i_nlink < 2)) 975 if ((direntry->d_inode) && (direntry->d_inode->i_nlink < 2))
976 direntry->d_inode->i_nlink = 2; 976 direntry->d_inode->i_nlink = 2;
977 mode &= ~current->fs->umask;
977 if (pTcon->unix_ext) { 978 if (pTcon->unix_ext) {
978 mode &= ~current->fs->umask;
979 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { 979 if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
980 CIFSSMBUnixSetPerms(xid, pTcon, full_path, 980 CIFSSMBUnixSetPerms(xid, pTcon, full_path,
981 mode, 981 mode,
@@ -994,9 +994,16 @@ mkdir_get_info:
994 CIFS_MOUNT_MAP_SPECIAL_CHR); 994 CIFS_MOUNT_MAP_SPECIAL_CHR);
995 } 995 }
996 } else { 996 } else {
997 /* BB to be implemented via Windows secrty descriptors 997 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_ACL) &&
998 eg CIFSSMBWinSetPerms(xid, pTcon, full_path, mode, 998 (mode & S_IWUGO) == 0) {
999 -1, -1, local_nls); */ 999 FILE_BASIC_INFO pInfo;
1000 memset(&pInfo, 0, sizeof(pInfo));
1001 pInfo.Attributes = cpu_to_le32(ATTR_READONLY);
1002 CIFSSMBSetTimes(xid, pTcon, full_path,
1003 &pInfo, cifs_sb->local_nls,
1004 cifs_sb->mnt_cifs_flags &
1005 CIFS_MOUNT_MAP_SPECIAL_CHR);
1006 }
1000 if (direntry->d_inode) { 1007 if (direntry->d_inode) {
1001 direntry->d_inode->i_mode = mode; 1008 direntry->d_inode->i_mode = mode;
1002 direntry->d_inode->i_mode |= S_IFDIR; 1009 direntry->d_inode->i_mode |= S_IFDIR;