Permalink
Browse files

Fix bug where users weren't seeing some of their processes

  • Loading branch information...
cormander committed Dec 3, 2011
1 parent 422c377 commit 42792c5003b826e500f8a366585fb21856dc22dc
Showing with 3 additions and 2 deletions.
  1. +3 −2 security.c
View
@@ -197,9 +197,10 @@ static int tpe_pid_revalidate(struct dentry *dentry, struct nameidata *nd) {
int (*run)(struct dentry *, struct nameidata *) = sym_pid_revalidate.run;
int ret;
struct inode *inode = dentry->d_inode;
if (tpe_ps && !capable(CAP_SYS_ADMIN) && inode && inode->i_uid != get_task_uid(current) &&
if (tpe_ps && !capable(CAP_SYS_ADMIN) &&
dentry->d_inode && dentry->d_inode->i_uid != get_task_uid(current) &&
dentry->d_parent->d_inode && dentry->d_parent->d_inode->i_uid != get_task_uid(current) &&
(!tpe_ps_gid || (tpe_ps_gid && !in_group_p(tpe_ps_gid))))
return -EPERM;

0 comments on commit 42792c5

Please sign in to comment.