]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[CIFS] Respect umask when using POSIX mkdir
authorJeff <jlayton@redhat.com>
Thu, 13 Sep 2007 18:38:50 +0000 (18:38 +0000)
committerSteve French <sfrench@us.ibm.com>
Thu, 13 Sep 2007 18:38:50 +0000 (18:38 +0000)
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>
fs/cifs/inode.c

index 66436f527c3bba7613aef89b74760f05bcc55ee4..e800c0ef54f650d22b8861d553ba4be8f04d6f80 100644 (file)
@@ -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,