wierd current->uid in module
hi
i am doing a project on
a very simple system call interception module. the module is supposed to return the uid of the
user who made the call to the syscall. i m trying to do it thus:
//in the kernel module
asmlinkage long my_syscall(arg1,arg2)
{
sprintf(buffer, "%s%s%i", arg1,arg2,current->uid); //this buffer is later read.
return original_syscall(arg1,arg2);
}
the problem is that the uid returned is always -1
whether the user is root or otherwise.
could you suggest a way out please.
thanx
-kt
Signature · 1 line
http://www.fastmail.fm - The way an email service should be