[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trapping execve()
On Thu, May 09, 2002 at 10:35:25PM +0530, Sridhar N wrote:
> Hello, I wrote a small module to trap and log all calls to execve()
> but the kernel gives a segmentation fault and does not allow me to
> execute any programs...
>
> int (*orig_execve)(const char *, char const **,char const **);
> int my_execve(const char * path, char const *argv[],char const * envp[])
It is my understanding that char const ** is different from
char const *argv[]. (My Peter van der Linden is not here, I can't cite
specifics, sorry.)
You may have different results to make my_execve() take the same
arguments as the prototype for orig_execve.
I hope this helps.
--
http://www.wirex.com/
PGP signature