* Niki Rahimi (narahimiat_private) wrote: > > Thanks Greg! Sounds good to me. Suppose I pick the number, how will I > specify it to that value in the main module so that when I initialize it in > my user admin code, the admin code will recognize it? Right now, after > insmod'ing my module, upon compiling the admin code, I get an "undefined > reference to tpe_sys_security" even though /proc/ksyms lists tpe_ops. The admin (userspace) code should use security(modid, call, *args). The security syscall is not fully supported in glibc, so you'll need to set it up with the _syscall3 macro (see asm/unistd.h). IOW, you want to call sys_security(2) from userspace which will call your module's registered sys_security() callback, e.g., tpe_sys_security. smth. like: #include <linux/unistd.h> /* to get the actual syscall number for the kernel see your asm/unistd.h * from the kernel souce. should be like below */ #define __NR_security 223 _syscall3(int, security, unsigned int, id, unsigned int, call, unsigned long *, args); /* now you should be able to simply call, security(id, call, *args) */ hope that helps, -chris -- Linux Security Modules http://lsm.immunix.org http://lsm.bkbits.net _______________________________________________ linux-security-module mailing list linux-security-moduleat_private http://mail.wirex.com/mailman/listinfo/linux-security-module
This archive was generated by hypermail 2b30 : Wed Jun 19 2002 - 14:45:23 PDT