|
@@ -697,11 +697,11 @@ static int proc_pid_permission(struct inode *inode, int mask)
|
|
|
task = get_proc_task(inode);
|
|
|
if (!task)
|
|
|
return -ESRCH;
|
|
|
- has_perms = has_pid_permissions(pid, task, 1);
|
|
|
+ has_perms = has_pid_permissions(pid, task, HIDEPID_NO_ACCESS);
|
|
|
put_task_struct(task);
|
|
|
|
|
|
if (!has_perms) {
|
|
|
- if (pid->hide_pid == 2) {
|
|
|
+ if (pid->hide_pid == HIDEPID_INVISIBLE) {
|
|
|
/*
|
|
|
* Let's make getdents(), stat(), and open()
|
|
|
* consistent with each other. If a process
|
|
@@ -1737,7 +1737,7 @@ int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
|
|
|
stat->gid = GLOBAL_ROOT_GID;
|
|
|
task = pid_task(proc_pid(inode), PIDTYPE_PID);
|
|
|
if (task) {
|
|
|
- if (!has_pid_permissions(pid, task, 2)) {
|
|
|
+ if (!has_pid_permissions(pid, task, HIDEPID_INVISIBLE)) {
|
|
|
rcu_read_unlock();
|
|
|
/*
|
|
|
* This doesn't prevent learning whether PID exists,
|
|
@@ -3168,7 +3168,7 @@ int proc_pid_readdir(struct file *file, struct dir_context *ctx)
|
|
|
int len;
|
|
|
|
|
|
cond_resched();
|
|
|
- if (!has_pid_permissions(ns, iter.task, 2))
|
|
|
+ if (!has_pid_permissions(ns, iter.task, HIDEPID_INVISIBLE))
|
|
|
continue;
|
|
|
|
|
|
len = snprintf(name, sizeof(name), "%d", iter.tgid);
|