Commit 36d03f0b authored by William Lee Irwin III's avatar William Lee Irwin III Committed by Greg Kroah-Hartman

[PATCH] converting cap_set_pg() to for_each_task_pid()

cap_set_pg() wants to find all processes in a given process group. This
converts it to use for_each_task_pid().
parent 6f1aeac5
...@@ -84,13 +84,15 @@ static inline void cap_set_pg(int pgrp, kernel_cap_t *effective, ...@@ -84,13 +84,15 @@ static inline void cap_set_pg(int pgrp, kernel_cap_t *effective,
kernel_cap_t *inheritable, kernel_cap_t *inheritable,
kernel_cap_t *permitted) kernel_cap_t *permitted)
{ {
task_t *g, *target; task_t *g, *target;
struct list_head *l;
do_each_thread(g, target) { struct pid *pid;
if (target->pgrp != pgrp)
continue; for_each_task_pid(pgrp, PIDTYPE_PGID, g, l, pid) {
security_capset_set(target, effective, inheritable, permitted); target = g;
} while_each_thread(g, target); while_each_thread(g, target)
security_capset_set(target, effective, inheritable, permitted);
}
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment