diff options
author | Roland McGrath <roland@gnu.org> | 2000-02-05 11:59:54 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2000-02-05 11:59:54 +0000 |
commit | 51a44cae5fb563fee0e1cc9a96b26c845cd4121c (patch) | |
tree | d960c7a7cea15e251ad74a5d5ab8b48a7a9eb1a7 /ext2fs/inode.c | |
parent | e4297b3490c1b1f03b12480a815f6eaa7b900105 (diff) | |
download | hurd-51a44cae5fb563fee0e1cc9a96b26c845cd4121c.tar.gz hurd-51a44cae5fb563fee0e1cc9a96b26c845cd4121c.tar.bz2 hurd-51a44cae5fb563fee0e1cc9a96b26c845cd4121c.zip |
2000-02-05 Roland McGrath <roland@baalperazim.frob.com>
* ext2_fs.h: Update from Linux 2.3.42 version (ext2_fs_i.h unchanged).
* inode.c (check_high_bits): In accordance with Linux 2.3.42 behavior,
permit 32-bit uids on non-hurd filesystems unless i_dtime is zero
(which indicates an extra old Linux ext2 implementation I guess).
Diffstat (limited to 'ext2fs/inode.c')
-rw-r--r-- | ext2fs/inode.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ext2fs/inode.c b/ext2fs/inode.c index 6be299fd..b3f07df4 100644 --- a/ext2fs/inode.c +++ b/ext2fs/inode.c @@ -335,8 +335,17 @@ check_high_bits (struct node *np, long l) { if (sblock->s_creator_os == EXT2_OS_HURD) return 0; - else - return ((l & ~0xFFFF) == 0) ? 0 : EINVAL; + + /* Linux 2.3.42 has a mount-time option (not a bit stored on disk) + NO_UID32 to ignore the high 16 bits of uid and gid, but by default + allows them. It also does this check for "interoperability with old + kernels". Note that our check refuses to change the values, while + Linux 2.3.42 just silently clears the high bits in an inode it updates, + even if it was updating it for an unrelated reason. */ + if (np->dn->info.i_dtime != 0) + return 0; + + return ((l & ~0xFFFF) == 0) ? 0 : EINVAL; } /* Return 0 if NP's owner can be changed to UID; otherwise return an error |