📄 remove-suid-2.6-suse.patch
字号:
--- 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,19 @@ int remove_suid(struct dentry *dentry) if (unlikely(kill && !capable(CAP_FSETID))) { struct iattr newattrs;+ struct inode_operations *op = dentry->d_inode->i_op;++ if (op && op->setattr_raw) {+ 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; result = notify_change(dentry, &newattrs);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -