patch-2.3.3 linux/fs/namei.c

Next file: linux/fs/nfsd/vfs.c
Previous file: linux/fs/minix/namei.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.2/linux/fs/namei.c linux/fs/namei.c
@@ -882,10 +882,6 @@
 	return error;
 }
 
-/*
- * Look out: this function may change a normal dentry
- * into a directory dentry (different size)..
- */
 static inline int do_mkdir(const char * pathname, int mode)
 {
 	int error;
@@ -919,7 +915,7 @@
 		goto exit_lock;
 
 	DQUOT_INIT(dir->d_inode);
-	mode &= 0777 & ~current->fs->umask;
+	mode &= (S_IRWXUGO|S_ISVTX) & ~current->fs->umask;
 	error = dir->d_inode->i_op->mkdir(dir->d_inode, dentry, mode);
 
 exit_lock:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)