mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

152 lines
6.1 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/linux/linux24/80-ext23fs-suiddir.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. See the comments in Configure.help below for details.
  20. - Clifford
  21. --- ./fs/ext2/ialloc.c.orig 2002-02-25 20:38:08.000000000 +0100
  22. +++ ./fs/ext2/ialloc.c 2002-08-06 07:27:56.000000000 +0200
  23. @@ -379,6 +379,13 @@
  24. mode |= S_ISGID;
  25. } else
  26. inode->i_gid = current->fsgid;
  27. +#ifdef CONFIG_EXT2_FS_SUIDDIR
  28. + if (dir->i_mode & S_ISUID) {
  29. + mode |= (mode & 0700) >> 3;
  30. + if (S_ISDIR(mode))
  31. + mode |= S_ISUID;
  32. + }
  33. +#endif
  34. inode->i_mode = mode;
  35. inode->i_ino = ino;
  36. --- ./fs/ext3/ialloc.c.orig 2002-02-25 20:38:08.000000000 +0100
  37. +++ ./fs/ext3/ialloc.c 2002-08-06 07:27:56.000000000 +0200
  38. @@ -476,6 +476,13 @@
  39. mode |= S_ISGID;
  40. } else
  41. inode->i_gid = current->fsgid;
  42. +#ifdef CONFIG_EXT3_FS_SUIDDIR
  43. + if (dir->i_mode & S_ISUID) {
  44. + mode |= (mode & 0700) >> 3;
  45. + if (S_ISDIR(mode))
  46. + mode |= S_ISUID;
  47. + }
  48. +#endif
  49. inode->i_mode = mode;
  50. inode->i_ino = j;
  51. --- ./fs/Config.in.orig 2002-08-06 07:25:58.000000000 +0200
  52. +++ ./fs/Config.in 2002-08-06 07:29:17.000000000 +0200
  53. @@ -22,6 +22,8 @@
  54. dep_tristate 'BFS file system support (EXPERIMENTAL)' CONFIG_BFS_FS $CONFIG_EXPERIMENTAL
  55. tristate 'Ext3 journalling file system support' CONFIG_EXT3_FS
  56. +dep_mbool ' Ext3fs SUID on Directory Extension' CONFIG_EXT3_FS_SUIDDIR $CONFIG_EXT3_FS
  57. +
  58. # CONFIG_JBD could be its own option (even modular), but until there are
  59. # other users than ext3, we will simply make it be the same as CONFIG_EXT3_FS
  60. # dep_tristate ' Journal Block Device support (JBD for ext3)' CONFIG_JBD $CONFIG_EXT3_FS
  61. @@ -77,6 +79,7 @@
  62. tristate 'ROM file system support' CONFIG_ROMFS_FS
  63. tristate 'Second extended fs support' CONFIG_EXT2_FS
  64. +dep_mbool ' Ext2fs SUID on Directory Extension' CONFIG_EXT2_FS_SUIDDIR $CONFIG_EXT2_FS
  65. tristate 'System V/Xenix/V7/Coherent file system support' CONFIG_SYSV_FS
  66. --- ./Documentation/Configure.help.orig 2002-08-03 02:39:42.000000000 +0200
  67. +++ ./Documentation/Configure.help 2002-08-06 07:27:56.000000000 +0200
  68. @@ -14367,6 +14367,31 @@
  69. be compiled as a module, and so this could be dangerous. Most
  70. everyone wants to say Y here.
  71. +Ext2fs SUID on Directory Extension
  72. +CONFIG_EXT2_FS_SUIDDIR
  73. + As you might know, the SGID flag has a special function on directories:
  74. + files within that directories will be owned by the same group that also
  75. + owns the directory - which is useful for creating directories which are
  76. + shared between the members of a group.
  77. +
  78. + But that only makes sense if the umask is set to give full permissions to
  79. + the group (e.g. 007 or 002). Noone would do that if there is a system-wide
  80. + 'users' group - so some distributions add an extra group for every user
  81. + which lets the /etc/group file grow very fast and makes the admins life
  82. + harder ...
  83. +
  84. + Activating this feture adds a function to the SUID flag on directories,
  85. + which usually has no function at all:
  86. +
  87. + If the SUID flag is set for a diectory, all new files in that directory
  88. + will get the same rights in the group-field as they have in their
  89. + user-field. So, if one sets both - SUID and SGID - on a directory, it
  90. + will also work with a umask like 022 or 077 and there is no more need for
  91. + an extra group for every user.
  92. +
  93. + Also, the SUID flag will be set to all subdirectories of a SUID directory
  94. + (as it is already now with the SGID flag on directories).
  95. +
  96. Ext3 journalling file system support (EXPERIMENTAL)
  97. CONFIG_EXT3_FS
  98. This is the journalling version of the Second extended file system
  99. @@ -14399,6 +14424,31 @@
  100. of your root partition (the one containing the directory /) cannot
  101. be compiled as a module, and so this may be dangerous.
  102. +Ext3fs SUID on Directory Extension
  103. +CONFIG_EXT3_FS_SUIDDIR
  104. + As you might know, the SGID flag has a special function on directories:
  105. + files within that directories will be owned by the same group that also
  106. + owns the directory - which is useful for creating directories which are
  107. + shared between the members of a group.
  108. +
  109. + But that only makes sense if the umask is set to give full permissions to
  110. + the group (e.g. 007 or 002). Noone would do that if there is a system-wide
  111. + 'users' group - so some distributions add an extra group for every user
  112. + which lets the /etc/group file grow very fast and makes the admins life
  113. + harder ...
  114. +
  115. + Activating this feture adds a function to the SUID flag on directories,
  116. + which usually has no function at all:
  117. +
  118. + If the SUID flag is set for a diectory, all new files in that directory
  119. + will get the same rights in the group-field as they have in their
  120. + user-field. So, if one sets both - SUID and SGID - on a directory, it
  121. + will also work with a umask like 022 or 077 and there is no more need for
  122. + an extra group for every user.
  123. +
  124. + Also, the SUID flag will be set to all subdirectories of a SUID directory
  125. + (as it is already now with the SGID flag on directories).
  126. +
  127. Journal Block Device support (JBD for ext3) (EXPERIMENTAL)
  128. CONFIG_JBD
  129. This is a generic journalling layer for block devices. It is
  130. --- ./CREDITS.orig 2002-08-03 02:39:42.000000000 +0200
  131. +++ ./CREDITS 2002-08-06 07:27:56.000000000 +0200
  132. @@ -3231,6 +3231,8 @@
  133. E: god@clifford.at
  134. W: http://www.clifford.at/
  135. D: Menuconfig/lxdialog improvement
  136. +D: Initial Wacom Intuos USB Driver
  137. +D: Ext[23]FS and Reiserfs SUID on directories extension
  138. S: Foehrengasse 16
  139. S: A-2333 Leopoldsdorf b. Wien
  140. S: Austria