diff options
Diffstat (limited to 'fs/cifs/dir.c')
-rw-r--r-- | fs/cifs/dir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index f085db965788..8e86aaceb68a 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -208,7 +208,8 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
208 | /* If Open reported that we actually created a file | 208 | /* If Open reported that we actually created a file |
209 | then we now have to set the mode if possible */ | 209 | then we now have to set the mode if possible */ |
210 | if ((cifs_sb->tcon->ses->capabilities & CAP_UNIX) && | 210 | if ((cifs_sb->tcon->ses->capabilities & CAP_UNIX) && |
211 | (oplock & CIFS_CREATE_ACTION)) | 211 | (oplock & CIFS_CREATE_ACTION)) { |
212 | mode &= ~current->fs->umask; | ||
212 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { | 213 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { |
213 | CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, | 214 | CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode, |
214 | (__u64)current->fsuid, | 215 | (__u64)current->fsuid, |
@@ -226,7 +227,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
226 | cifs_sb->mnt_cifs_flags & | 227 | cifs_sb->mnt_cifs_flags & |
227 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 228 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
228 | } | 229 | } |
229 | else { | 230 | } else { |
230 | /* BB implement mode setting via Windows security | 231 | /* BB implement mode setting via Windows security |
231 | descriptors e.g. */ | 232 | descriptors e.g. */ |
232 | /* CIFSSMBWinSetPerms(xid,pTcon,path,mode,-1,-1,nls);*/ | 233 | /* CIFSSMBWinSetPerms(xid,pTcon,path,mode,-1,-1,nls);*/ |
@@ -336,6 +337,7 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, | |||
336 | if (full_path == NULL) | 337 | if (full_path == NULL) |
337 | rc = -ENOMEM; | 338 | rc = -ENOMEM; |
338 | else if (pTcon->ses->capabilities & CAP_UNIX) { | 339 | else if (pTcon->ses->capabilities & CAP_UNIX) { |
340 | mode &= ~current->fs->umask; | ||
339 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { | 341 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) { |
340 | rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, | 342 | rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path, |
341 | mode, (__u64)current->fsuid, | 343 | mode, (__u64)current->fsuid, |