Peter Samuelson wrote: > > [BERECZ Szabolcs] > > Here is a new syscall. With this you can change the owner of a running > > procces. > > > + if (current->euid) > > + return -EPERM; > > Use capable(). > > > + p = find_task_by_pid(pid); > > + p->fsuid = p->euid = p->suid = p->uid = uid; > > Race -- you need to make sure the task_struct doesn't disappear out > from under you. > > Anyway, why not use the interface 'chown uid /proc/pid'? No new > syscall, no arch-dependent part, no user-space tool, etc. Becouse of exactly the same race condition as above maybe? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo _at_ vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Follow-Ups:
- Re: [PATCH] new setprocuid syscallPeter Samuelson <peter _at_ cadcamlab.org>
- Re: [PATCH] new setprocuid syscallPeter Samuelson <peter _at_ cadcamlab.org>
- Prev by Date: Re: eepro100 + 2.2.18 + laptop problems
- Next by Date: Re: unresloved symbols in 2.4.1
- Prev by thread: Re: [PATCH] new setprocuid syscall
- Next by thread: Re: [PATCH] new setprocuid syscall
- Indexes:[Main][Thread]