[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-fsdevel
Subject: Discrepancy in ext2_new_inode from 2.2.5
From: Martin Pool <mbp () wistful ! humbug ! org ! au>
Date: 1999-04-10 7:13:37
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic