I want to use the LSM framework with kernel ubuntu 2.6.36.
When I compiled the kernel module, it wrote:
WARNING: "register_security " undefined!
After a lot of googlings, I found the reason is that the register_security()
symbol is no longer exported in the 2.6 kernel.
So I added EXPORT_SYMBOL(register_security)
in the ../security/security.c file, and recompiled the kernel.
After booting with the new kernel, I added extern int register_security(struct security_operations *ops)
in my kernel module file, and compiled the module again.
However, the WARNING information still existed. If I continued to insmode
the module, the dmesg
told me that
Unknown symbol register_security
What should I do? How can I register a Linux Security Module?