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.

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