[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
/proc file
Hi, I'm registering a /proc file like this:
create_proc_entry(PROC_FILE_NAME, S_IRUGO | S_IWUGO)
I expect I could write this file, I also register the file
inode_operations with a permission pointer containing this:
my_proc_permission (struct inode * inodep, int op){
if (op == 4 || (op == 2 && current->euid == 00))
return 0;
return -EACCES;
}
when I call:
open("/proc/my_proc", I_RDWR);
I get a Permission Denied error.
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
IRC Channel: irc.openprojects.net / #kernelnewbies
Web Page: http://www.kernelnewbies.org/