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.

83 lines
3.5 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/81-reiserfs-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. created by Clifford Wolf and Rene Rebe
  20. --- ./Documentation/Configure.help.orig 2003-04-29 21:57:54.000000000 +0200
  21. +++ ./Documentation/Configure.help 2003-04-29 22:28:05.000000000 +0200
  22. @@ -15233,6 +15233,32 @@
  23. performance cost of it. If you are fine-tuning reiserfs, say Y,
  24. otherwise say N.
  25. +Reiserfs SUID on Directory Extension
  26. +CONFIG_REISERFS_SUIDDIR
  27. + As you might know, the SGID flag has a special function on directories:
  28. + files within that directories will be owned by the same group that also
  29. + owns the directory - which is useful for creating directories which are
  30. + shared between the members of a group.
  31. +
  32. + But that only makes sense if the umask is set to give full permissions to
  33. + the group (e.g. 007 or 002). Noone would do that if there is a system-wide
  34. + 'users' group - so some distributions add an extra group for every user
  35. + which lets the /etc/group file grow very fast and makes the admins life
  36. + harder ...
  37. +
  38. + Activating this feture adds a function to the SUID flag on directories,
  39. + which usually has no function at all:
  40. +
  41. + If the SUID flag is set for a diectory, all new files in that directory
  42. + will get the same rights in the group-field as they have in their
  43. + user-field. So, if one sets both - SUID and SGID - on a directory, it
  44. + will also work with a umask like 022 or 077 and there is no more need for
  45. + an extra group for every user.
  46. +
  47. + Also, the SUID flag will be set to all subdirectories of a SUID directory
  48. + (as it is already now with the SGID flag on directories).
  49. +
  50. +
  51. Second extended fs support
  52. CONFIG_EXT2_FS
  53. This is the de facto standard Linux file system (method to organize
  54. --- ./fs/Config.in.orig 2002-12-11 19:42:57.000000000 +0100
  55. +++ ./fs/Config.in 2003-04-29 22:27:01.000000000 +0200
  56. @@ -11,6 +11,7 @@
  57. tristate 'Reiserfs support' CONFIG_REISERFS_FS
  58. dep_mbool ' Enable reiserfs debug mode' CONFIG_REISERFS_CHECK $CONFIG_REISERFS_FS
  59. dep_mbool ' Stats in /proc/fs/reiserfs' CONFIG_REISERFS_PROC_INFO $CONFIG_REISERFS_FS
  60. +dep_mbool ' Reiserfs SUID on Directory Extension' CONFIG_REISERFS_SUIDDIR $CONFIG_REISERFS_FS
  61. dep_tristate 'ADFS file system support (EXPERIMENTAL)' CONFIG_ADFS_FS $CONFIG_EXPERIMENTAL
  62. dep_mbool ' ADFS write support (DANGEROUS)' CONFIG_ADFS_FS_RW $CONFIG_ADFS_FS $CONFIG_EXPERIMENTAL
  63. --- ./fs/reiserfs/namei.c.orig 2003-04-29 21:55:36.000000000 +0200
  64. +++ ./fs/reiserfs/namei.c 2003-04-29 22:27:14.000000000 +0200
  65. @@ -518,6 +518,14 @@
  66. } else
  67. inode->i_gid = current->fsgid;
  68. +#ifdef CONFIG_REISERFS_SUIDDIR
  69. + if (dir->i_mode & S_ISUID) {
  70. + inode->i_mode |= (inode->i_mode & 0700) >> 3;
  71. + if (S_ISDIR(inode->i_mode))
  72. + inode->i_mode |= S_ISUID;
  73. + }
  74. +#endif
  75. +
  76. return 0 ;
  77. }