Re: How to find username who has accessed my file
- From: Ashish Kumar <ashish.sachan@xxxxxxxxx>
- Date: Wed, 19 Dec 2007 00:31:48 -0800 (PST)
On Dec 19, 11:34 am, William Pursell <bill.purs...@xxxxxxxxx> wrote:
On Dec 19, 6:13 am, Ashish Kumar <ashish.sac...@xxxxxxxxx> wrote:
Is there any wayout to find the username who has access my file in a
kernel module ?
Are you talking about a user who is running a process that
makes a call into your kernel module() to access a file?
If so, try getuid()/geteuid().
If you are talking about trying to find out who has read one
of the source files for a kernel module, I don't believe that
is in general possible.
Thanks for reply William.
user id i got simply putting current ->uid in my open call of module.
But now looking how to get username from this uid.
Regards,
Ashish
.
- Follow-Ups:
- Re: How to find username who has accessed my file
- From: Josef Moellers
- Re: How to find username who has accessed my file
- References:
- How to find username who has accessed my file
- From: Ashish Kumar
- Re: How to find username who has accessed my file
- From: William Pursell
- How to find username who has accessed my file
- Prev by Date: file system mounting and unmounting
- Next by Date: Why no nodes for network devices?
- Previous by thread: Re: How to find username who has accessed my file
- Next by thread: Re: How to find username who has accessed my file
- Index(es):