aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorJeff <jlayton@redhat.com>2007-09-13 18:38:50 +0000
committerSteve French <sfrench@us.ibm.com>2007-09-13 18:38:50 +0000
commita8cd925f74c3b1b6d1192f9e75f9d12cc2ab148a (patch)
tree16ecee715df1a99f580ca0a1a5863af81e623075 /fs/cifs
parent[CIFS] lock inode open file list in close in case racing with open (diff)
downloadlinux-dev-a8cd925f74c3b1b6d1192f9e75f9d12cc2ab148a.tar.xz
linux-dev-a8cd925f74c3b1b6d1192f9e75f9d12cc2ab148a.zip
[CIFS] Respect umask when using POSIX mkdir
When making a directory with POSIX mkdir calls, cifs_mkdir does not respect the umask. This patch causes the new POSIX mkdir to create with the right mode Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 66436f527c3b..e800c0ef54f6 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -919,6 +919,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode)
goto mkdir_out;
}
+ mode &= ~current->fs->umask;
rc = CIFSPOSIXCreate(xid, pTcon, SMB_O_DIRECTORY | SMB_O_CREAT,
mode, NULL /* netfid */, pInfo, &oplock,
full_path, cifs_sb->local_nls,