On Sun, 2007-02-18 at 19:33 +0530, BVK wrote: > Is there any UID and the corresponding GIDs -- in which he is > member of -- information stored inside the kernel? If yes, can you > please point me the relavent data structures? And also, how it is > kept uptodate? All of the management happens in userspace. Processes are assigned the UIDs and GIDs of the user that executed them. The kernel has no idea that my UID is N and my GID is M, but when I run a program, this information gets stored in the kernel, in struct task_struct (linux/sched.h). Now when the program wants to open a file, for example, the UID and GIDs stored in task_struct are compared to the allowable UID and GIDs for the file. You can see this checking being done in generic_permission (fs/namei.c). Note that only some file systems use this functions, while others implement their own. The variable "current" is the task_struct of the current process. Hope that helps. Avishay -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ