Re: sys_execve() from kernelspace

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

 



On Tue, May 25, 2004 at 10:51:55PM +0200, threadhead@web.de wrote:
> > Try using call_usermodehelper() instead, that is what it is there for.
> > 
> > Good luck,
> > 
> > greg k-h
> 
> i tried calling it with the correct parameters, i copied some of the bluetooth code from the kernel.
> well, the return value of the function is zero but i dont see the program run.
> 
> as a test i executed /bin/ping to a certain ip with wait as 0.
> there was nothing to be seen by tcpdump and/or 'ps'.
> i am using a 2.6 kernel, the comment above the call_usermodehelper function is as follows:
> 
> 232  * Runs a user-space application.  The application is started
> 233  * asynchronously if wait is not set, and runs as a child of keventd.
> 234  * (ie. it runs with full root capabilities).
> 
> as far as i know, i do not have keventd running on my system. (or at least it doesnt show up by ps aux)
> is that required anyway?
> what else could be a problem with my function call?
> 
> heres how i have done it:
> 
> #define PROGRAM_TO_RUN "/bin/ping"
> char *argv[] = { "192.168.0.1", NULL };

argv[0] must point to your program that you want to run.
argv[1] is what you want to set to a ip address.

Try that.

greg k-h

--
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