ChangeSet 1.899, 2002/12/18 14:58:27-08:00, wliat_private [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(). diff -Nru a/kernel/capability.c b/kernel/capability.c --- a/kernel/capability.c Wed Dec 18 15:13:37 2002 +++ b/kernel/capability.c Wed Dec 18 15:13:37 2002 @@ -84,13 +84,15 @@ kernel_cap_t *inheritable, kernel_cap_t *permitted) { - task_t *g, *target; + task_t *g, *target; + struct list_head *l; + struct pid *pid; - do_each_thread(g, target) { - if (target->pgrp != pgrp) - continue; - security_capset_set(target, effective, inheritable, permitted); - } while_each_thread(g, target); + for_each_task_pid(pgrp, PIDTYPE_PGID, g, l, pid) { + target = g; + while_each_thread(g, target) + security_capset_set(target, effective, inheritable, permitted); + } } /* _______________________________________________ linux-security-module mailing list linux-security-moduleat_private http://mail.wirex.com/mailman/listinfo/linux-security-module
This archive was generated by hypermail 2b30 : Wed Dec 18 2002 - 21:48:15 PST