/usr/src/kernel-patches/lustre/patches/remove-suid-2.6-suse.patch is in linux-patch-lustre 1.8.5+dfsg-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | --- linux-2.6.5-7.141/mm/filemap.c.orig 2005-02-18 14:53:26.000000000 +0200
+++ linux-2.6.5-7.141/mm/filemap.c 2005-02-18 22:37:28.727492096 +0200
@@ -1816,6 +1816,21 @@
int __remove_suid(struct dentry *dentry, int kill)
{
struct iattr newattrs;
+ struct inode_operations *op = dentry->d_inode->i_op;
+
+ if (op && op->setattr_raw) {
+ int result;
+ mode_t mode = dentry->d_inode->i_mode;
+ newattrs.ia_mode = mode & ~S_ISUID;
+ if (kill & ATTR_KILL_SGID)
+ newattrs.ia_mode &= ~S_ISGID;
+
+ newattrs.ia_valid = ATTR_FORCE | ATTR_MODE;
+ result = op->setattr_raw(dentry->d_inode, &newattrs);
+ /* the file system wants to use normal vfs path now */
+ if (result != -EOPNOTSUPP)
+ return result;
+ }
newattrs.ia_valid = ATTR_FORCE | kill;
return notify_change(dentry, &newattrs);
|