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.

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