|
|
# --- 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/powerpc/linux24benh/80-ext23fs-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 ---
See the comments in Configure.help below for details.
- Clifford
--- ./fs/ext2/ialloc.c.orig 2002-02-25 20:38:08.000000000 +0100
+++ ./fs/ext2/ialloc.c 2002-08-06 07:27:56.000000000 +0200
@@ -379,6 +379,13 @@
mode |= S_ISGID; } else inode->i_gid = current->fsgid; +#ifdef CONFIG_EXT2_FS_SUIDDIR
+ if (dir->i_mode & S_ISUID) {
+ mode |= (mode & 0700) >> 3;
+ if (S_ISDIR(mode))
+ mode |= S_ISUID;
+ }
+#endif
inode->i_mode = mode; inode->i_ino = ino; --- ./fs/ext3/ialloc.c.orig 2002-02-25 20:38:08.000000000 +0100
+++ ./fs/ext3/ialloc.c 2002-08-06 07:27:56.000000000 +0200
@@ -476,6 +476,13 @@
mode |= S_ISGID; } else inode->i_gid = current->fsgid; +#ifdef CONFIG_EXT3_FS_SUIDDIR
+ if (dir->i_mode & S_ISUID) {
+ mode |= (mode & 0700) >> 3;
+ if (S_ISDIR(mode))
+ mode |= S_ISUID;
+ }
+#endif
inode->i_mode = mode; inode->i_ino = j; --- ./fs/Config.in.orig 2002-08-06 07:25:58.000000000 +0200
+++ ./fs/Config.in 2002-08-06 07:29:17.000000000 +0200
@@ -22,6 +22,8 @@
dep_tristate 'BFS file system support (EXPERIMENTAL)' CONFIG_BFS_FS $CONFIG_EXPERIMENTAL tristate 'Ext3 journalling file system support' CONFIG_EXT3_FS +dep_mbool ' Ext3fs SUID on Directory Extension' CONFIG_EXT3_FS_SUIDDIR $CONFIG_EXT3_FS
+
# CONFIG_JBD could be its own option (even modular), but until there are # other users than ext3, we will simply make it be the same as CONFIG_EXT3_FS # dep_tristate ' Journal Block Device support (JBD for ext3)' CONFIG_JBD $CONFIG_EXT3_FS @@ -77,6 +79,7 @@
tristate 'ROM file system support' CONFIG_ROMFS_FS tristate 'Second extended fs support' CONFIG_EXT2_FS +dep_mbool ' Ext2fs SUID on Directory Extension' CONFIG_EXT2_FS_SUIDDIR $CONFIG_EXT2_FS
tristate 'System V/Xenix/V7/Coherent file system support' CONFIG_SYSV_FS --- ./Documentation/Configure.help.orig 2002-08-03 02:39:42.000000000 +0200
+++ ./Documentation/Configure.help 2002-08-06 07:27:56.000000000 +0200
@@ -14367,6 +14367,31 @@
be compiled as a module, and so this could be dangerous. Most everyone wants to say Y here. +Ext2fs SUID on Directory Extension
+CONFIG_EXT2_FS_SUIDDIR
+ 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).
+
Ext3 journalling file system support (EXPERIMENTAL) CONFIG_EXT3_FS This is the journalling version of the Second extended file system @@ -14399,6 +14424,31 @@
of your root partition (the one containing the directory /) cannot be compiled as a module, and so this may be dangerous. +Ext3fs SUID on Directory Extension
+CONFIG_EXT3_FS_SUIDDIR
+ 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).
+
Journal Block Device support (JBD for ext3) (EXPERIMENTAL) CONFIG_JBD This is a generic journalling layer for block devices. It is --- ./CREDITS.orig 2002-08-03 02:39:42.000000000 +0200
+++ ./CREDITS 2002-08-06 07:27:56.000000000 +0200
@@ -3231,6 +3231,8 @@
E: god@clifford.at W: http://www.clifford.at/ D: Menuconfig/lxdialog improvement +D: Initial Wacom Intuos USB Driver
+D: Ext[23]FS and Reiserfs SUID on directories extension
S: Foehrengasse 16 S: A-2333 Leopoldsdorf b. Wien S: Austria
|