lkml.org 
[lkml]   [1999]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectDiscrepancy in ext2_new_inode from 2.2.5
Date
ext2_new_inode from 2.2.5 contains this code to handle SysV/BSD group
semantics: (ialloc.c:468)

if (test_opt (sb, GRPID))
inode->i_gid = dir->i_gid;
else if (dir->i_mode & S_ISGID) {
inode->i_gid = dir->i_gid;
if (S_ISDIR(mode))
mode |= S_ISGID;
} else
inode->i_gid = current->fsgid;

However, the new value assigned to mode in the middle case is never
used in the rest of the function. The grpid function is separately
implemented in ext2_mkdir (namei.c:520):

if (dir->i_mode & S_ISGID)
inode->i_mode |= S_ISGID;

with slightly different behaviour: the SGID bit is inherited even if
the fs is mounted -o nogrpid. It's harmless, but I noticed it and
thought perhaps somebody would like to delete the redundant code from
ialloc.c -- or tell me what I've missed.

--
Martin Pool

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.024 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site