[FIX] Re: symlink permissions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Keith and Andrew,

On Tue, 2004-12-07 at 09:19, Keith Young wrote:
> When CONFIG_EXT3_FS_POSIX_ACL is not defined, ext3_init_acl() is an
> inline function in fs/ext3/acl.h which doesn't check if a file is a
> symlink before applying umask.

That's a bug, indeed. Thanks for reporting; a fix is attached.

Andrew, could you please push this to Linus? Thanks!

Cheers,
-- 
Andreas Gruenbacher <agruen@xxxxxxx>
SUSE Labs, SUSE LINUX GMBH
--- Begin Message ---
Keith Young <stripyd@xxxxxxxxxxxxx> has reported that when ACLs are
not compiled in, the default implementation of ext[23]_init_acl applies
the umask to all new files, including symlinks, which is wrong. In this
case the VFS already takes care of applying the umask when needed, so
ext2 and ext3 need not bother about it. Remove the superfluous
statements.

Signed-off-by: Andreas Gruenbacher <agruen@xxxxxxx>

Index: linux-2.6.10-rc2/fs/ext3/acl.h
===================================================================
--- linux-2.6.10-rc2.orig/fs/ext3/acl.h
+++ linux-2.6.10-rc2/fs/ext3/acl.h
@@ -79,7 +79,6 @@ ext3_acl_chmod(struct inode *inode)
 static inline int
 ext3_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
 {
-	inode->i_mode &= ~current->fs->umask;
 	return 0;
 }
 #endif  /* CONFIG_EXT3_FS_POSIX_ACL */
Index: linux-2.6.10-rc2/fs/ext2/acl.h
===================================================================
--- linux-2.6.10-rc2.orig/fs/ext2/acl.h
+++ linux-2.6.10-rc2/fs/ext2/acl.h
@@ -77,7 +77,6 @@ ext2_acl_chmod (struct inode *inode)
 
 static inline int ext2_init_acl (struct inode *inode, struct inode *dir)
 {
-	inode->i_mode &= ~current->fs->umask;
 	return 0;
 }
 #endif

--- End Message ---
_______________________________________________

Ext3-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux