<div dir="ltr">Actually, this is not a college assignment. I'm a professional software engineer who is completely new to kernel programming.<div>I recently gave an interview to one cloud security firm. The interviewer gave me this particular assignment, since this kind of functionality is needed in their software.</div><div>Now I'm aware that the approach I have (syscall interception) is wrong.</div><div>But I also need to find out alternate mechanism to achieve my goal.</div><div>I searched really hard, but got nothing.</div><div><br></div><div>Thanks,</div><div>Ajinkya.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 8, 2017 at 9:34 PM, Greg KH <span dir="ltr"><<a href="mailto:greg@kroah.com" target="_blank">greg@kroah.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, Jul 08, 2017 at 09:08:40PM +0530, Ajinkya Surnis wrote:<br>
> The purpose of assignment is to check the authenticity of the user executing<br>
> the system call, and prevent certain users from executing, kind of like certain<br>
> security programs (although I don't exactly know how they work).<br>
<br>
</span>Then that's a totally different thing.<br>
<br>
Don't hook a syscall for this at all.<br>
<br>
There is a better way, and a correct one, but as this is a homework<br>
assignment, and I'm not the one getting credit for the assignment, I'm<br>
not going to spell it out how to do it, sorry. Otherwise you would get<br>
in trouble.<br>
<br>
Actually, are you sure you are allowed to ask for help for your<br>
assignment from others in the first place? Most schools have rules<br>
about stuff like this...<br>
<br>
greg k-h<br>
</blockquote></div><br></div>