我想在内核ubuntu 2.6.36上使用LSM框架。如何在内核2.6中注册Linux安全模块?
当我编译内核模块,它写道:
警告: “register_security” 不确定!
经过大量的googlings之后,我发现原因是register_security()
符号不再在2.6内核中输出。
因此,我在../security/security.c文件中添加了EXPORT_SYMBOL(register_security)
,并重新编译了内核。
在使用新内核启动后,我在内核模块文件中添加了extern int register_security(struct security_operations *ops)
,然后再次编译模块。 但是,WARNING信息依然存在。如果我继续insmode
模块时,dmesg
告诉我,
未知符号register_security
我应该怎么办?我怎样才能注册一个LSM模块?
非常感谢!
此致敬礼!
F.张