Re: prevent execution of a binary.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/14/05, Jinu Joy <jinu.vnc@xxxxxxxxx> wrote:
> Hi,
> 
> I want to write a piece of code (user or kernel space) that will stop
> execution of a particular binary say N. Donot want to tie up the
> executable to any user and do a chown or chmod. Want to prevent the
> execution independent of any user association.

try to do this in "execve" system call. For the implementation of this
system call, see the sys_execve() function in kernel at following
link:
http://lxr.linux.no/source/arch/i386/kernel/process.c#L667

After getting the file name in this function (which will be the path
of the exe), check if it is the executable which you dont want to
execute, just return relevant error code to user space.

Hope this helps.

-GD

> Is file system filter driver a valid option?
> 
> Can someone give me pointers to how I can do that on Linux.
> 
> If there exists some file execution event a user space application can
> register to and stop the execution would be ideal for my scenario.
> 
> Thanks,
> -Jinu
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
> 
>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux