wierd current->uid in module
hi
i am new to the kernel. i am working on a simple
system call interception module that is supposed
to return the uid of the user who made the call.
this i do by using current->uid.
a fragment of my code:
//in kernel module
asmlinkage long my_mkdir(const char * filename) {
sprintf(buffer,"%s,%i",filename, current->uid); //this buffer is later read.
return original_mkdir( filename);
}
the problem is that the current->uid value always turns out to be -1, whether its root or a non-root
user.
im using redhat 7.2 (kernel 2.4.7-10)
can anyone please help me out..
thanx in advance,
kt
Signature · 1 line
http://www.fastmail.fm - mmm... Fastmail...