<br><br><div class="gmail_quote">On Wed, Nov 23, 2011 at 11:35 PM, Geraint Yang <span dir="ltr">&lt;<a href="mailto:geraint0923@gmail.com">geraint0923@gmail.com</a>&gt;</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 &quot;waining:&#39;register_security&#39; undefined&quot;, 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&#39;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">&lt;<a href="mailto:alex.juncu@rosedu.org" target="_blank">alex.juncu@rosedu.org</a>&gt;</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 &lt;<a href="mailto:geraint0923@gmail.com" target="_blank">geraint0923@gmail.com</a>&gt; wrote:<br>



&gt; Hi,<br>
&gt; Thank all of you for helping me with problem!<br>
&gt; I don&#39;t want to modify my kernel source so I am trying to learn to use LSM<br>
&gt; security hook even though it seems that it couldn&#39;t hook all the system<br>
&gt; calls, I think it should be enough for me.<br>
&gt; 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>