<br><br><div class="gmail_quote">On Wed, Nov 23, 2011 at 11:35 PM, Geraint Yang <span dir="ltr"><<a href="mailto:geraint0923@gmail.com">geraint0923@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>I have tried the LSM framework,but when I make my module , I got "waining:'register_security' undefined", then I check security/security.c and found out that register_security is not exported ! So if I want to use this function ,I must hack kernel by exporting and recompiling kernel which is allowed for me.<br>
So ...well, it seems that LSM doesn't work for module without modifying the kernel source.<div><div></div><div class="h5"><br><br><br></div></div></blockquote><div>This function is declared as extern in header linux/security.h, you can include this header in your code and call this function. </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5"><br><div class="gmail_quote">On Thu, Nov 24, 2011 at 12:59 AM, Alexandru Juncu <span dir="ltr"><<a href="mailto:alex.juncu@rosedu.org" target="_blank">alex.juncu@rosedu.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Wed, Nov 23, 2011 at 6:50 PM, Geraint Yang <<a href="mailto:geraint0923@gmail.com" target="_blank">geraint0923@gmail.com</a>> wrote:<br>
> Hi,<br>
> Thank all of you for helping me with problem!<br>
> I don't want to modify my kernel source so I am trying to learn to use LSM<br>
> security hook even though it seems that it couldn't hook all the system<br>
> calls, I think it should be enough for me.<br>
> Thanks again!<br>
<br>
</div>I know that AppArmor can hock syscalls like read, write and memory<br>
mapping and can deny or accept them. I am not sure if you can make it<br>
do something else when hocked, but I know it has a script-like<br>
configuration, so maybe you can take some other actions.<br>
</blockquote></div><br><br clear="all"><br></div></div><div><div></div><div class="h5">-- <br><div style="text-align:left">Geraint Yang <br>Tsinghua University Department of Computer Science and Technology</div>
<div><br></div><br>
</div></div></blockquote></div>Regards,<div>Rohan Puri</div>