# --- ROCK-COPYRIGHT-NOTE-BEGIN --- # # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # Please add additional copyright information _after_ the line containing # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by # the ./scripts/Create-CopyPatch script. Do not edit this copyright text! # # ROCK Linux: rock-src/package/base/linux26/81-reiser-suiddir.patch # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. A copy of the GNU General Public # License can be found at Documentation/COPYING. # # Many people helped and are helping developing ROCK Linux. Please # have a look at http://www.rocklinux.org/ and the Documentation/TEAM # file for details. # # --- ROCK-COPYRIGHT-NOTE-END --- --- ./fs/reiserfs/namei.c.orig 2003-01-13 10:03:00.000000000 +0100 +++ ./fs/reiserfs/namei.c 2003-01-13 10:03:57.000000000 +0100 @@ -555,6 +555,13 @@ } else { inode->i_gid = current->fsgid; } +#ifdef CONFIG_REISERFS_FS_SUIDDIR + if (dir->i_mode & S_ISUID) { + inode->i_mode |= (inode->i_mode & 0700) >> 3; + if (S_ISDIR(inode->i_mode)) + inode->i_mode |= S_ISUID; + } +#endif return 0 ; } --- ./fs/Kconfig.orig 2003-01-13 10:00:39.000000000 +0100 +++ ./fs/Kconfig 2003-01-13 10:04:55.000000000 +0100 @@ -252,6 +252,35 @@ Almost everyone but ReiserFS developers and people fine-tuning reiserfs or tracing problems should say N. +config REISERFS_FS_SUIDDIR + bool "Reiserfs SUID on Directory Extension" + depends on REISERFS_FS + help + As you might know, the SGID flag has a special function on + directories: files within that directories will be owned by + the same group that also owns the directory - which is useful + for creating directories which are shared between the members + of a group. + + But that only makes sense if the umask is set to give full + permissions to the group (e.g. 007 or 002). Noone would do that + if there is a system-wide 'users' group - so some distributions + add an extra group for every user which lets the /etc/group + file grow very fast and makes the admins life harder ... + + Activating this feture adds a function to the SUID flag on + directories, which usually has no function at all: + + If the SUID flag is set for a diectory, all new files in that + directory will get the same rights in the group-field as they + have in their user-field. So, if one sets both - SUID and SGID + - on a directory, it will also work with a umask like 022 or + 077 and there is no more need for an extra group for every user. + + Also, the SUID flag will be set to all subdirectories of a + SUID directory (as it is already now with the SGID flag on + directories). + config JFS_FS tristate "JFS filesystem support" help