Re: [PATCH 02/10] Task Containers(V11): Add tasks file interface

2007-07-20 Thread Paul Menage
On 7/20/07, James Morris <[EMAIL PROTECTED]> wrote: > + if ((current->euid) && (current->euid != tsk->uid) > + && (current->euid != tsk->suid)) { > + put_task_struct(tsk); > + return -EACCES; I wonder if we should allow CAP_SYS_

Re: [PATCH 02/10] Task Containers(V11): Add tasks file interface

2007-07-20 Thread James Morris
On Fri, 20 Jul 2007, [EMAIL PROTECTED] wrote: > +/* > + * Attach task with pid 'pid' to container 'cont'. Call with > + * container_mutex, may take task_lock of task > + */ > +static int attach_task_by_pid(struct container *cont, char *pidbuf) > +{ > + pid_t pid; > + struct task_struct *ts

[PATCH 02/10] Task Containers(V11): Add tasks file interface

2007-07-20 Thread menage
This patch adds the per-directory "tasks" file for containerfs mounts; this allows the user to determine which tasks are members of a container by reading a container's "tasks", and to move a task into a container by writing its pid to its "tasks". Signed-off-by: Paul Menage <[EMAIL PROTECTED]> --