Messages in this thread | | | From | project8sem4@fastmail ... | Date | Sat, 01 May 2004 21:22:19 -0700 | Subject | 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
-- http://www.fastmail.fm - mmm... Fastmail... - 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/
| |