Messages in this thread |  | | Date | Tue, 27 Aug 2002 14:21:02 -0700 | Subject | Re: problems with changing UID/GID | From | Mike Touloumtzis <> |
| |
On Mon, Aug 26, 2002 at 02:45:51PM +0100, Alan Cox wrote: > On Mon, 2002-08-26 at 14:30, Zheng Jian-Ming wrote: > > > But, the credentials are per-task in Linux, so it's possible to have > > two tasks in a process running under different UIDs. > > Really useful isnt it > > There are other reasons for wanting refcounted credential structures (eg > NFS writeback) so it may well be that once those go in for other reasons > it makes sense to provide an option to do shared credentials for > threaded apps. It is however nontrivial and you might want to see how > your other systems respond to things like a file open on a slow device > while a second thread is strobing the uid between two values. Does it > change uid mid syscall, does it get the permissions checks right if so ? > > Its non trivial stuff, if not plain crazy to implement a literal > interpretation of (eg does a write fail half way if you change userid in > another thread ?)
Does POSIX really require that granularity of change? Would an implementation which, say, stored all credentials per-thread/task and only picked up changes from other threads at kernel entry/exit not be in spec? That seems like a lower overhead solution than locking all access to UIDs.
miket - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |