Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-07-15 05:59:19 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2006-07-15 12:45:13 -0700
commit17fe0b2d3142f81b09ece55aa5e290cdc49b4a22 (patch)
tree0330e9d1d30aeaf0255cd1282d4374c973f94404
parentf7a3975e687412bc400352e0eeaf9a8521de4e10 (diff)
[PATCH] Relax /proc fix a bit
Relax /proc fix a bit Clearign all of i_mode was a bit draconian. We only really care about S_ISUID/ISGID, after all. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--fs/proc/base.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 9d996746a1a6..38f39c183490 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1366,8 +1366,8 @@ static int pid_revalidate(struct dentry *dentry, struct nameidata *nd)
} else {
inode->i_uid = 0;
inode->i_gid = 0;
- inode->i_mode = 0;
}
+ inode->i_mode &= ~(S_ISUID | S_ISGID);
security_task_to_inode(task, inode);
return 1;
}
@@ -1395,6 +1395,7 @@ static int tid_fd_revalidate(struct dentry *dentry, struct nameidata *nd)
inode->i_uid = 0;
inode->i_gid = 0;
}
+ inode->i_mode &= ~(S_ISUID | S_ISGID);
security_task_to_inode(task, inode);
return 1;
}