Re: Questions on intercepting execve syscall

2003-11-17 Thread Samy Al Bahra
Quoting Murat Balaban [EMAIL PROTECTED]: It might be that you have some bad address in the execve index of sysent array. This is likely. He could add a printf statement before calling the original execve just to be sure. See http://www.enderunix.org/murat/linux_subexec/linux_subexec.c for a

Re: Questions on intercepting execve syscall

2003-11-17 Thread Pawel Jakub Dawidek
On Mon, Nov 17, 2003 at 11:02:10AM +0300, Samy Al Bahra wrote: + See http://www.enderunix.org/murat/linux_subexec/linux_subexec.c for a simple + example. + + This is 4.X specific (proc usage). I would just like to note that there is an + execve symbol which you can reference in your code

Questions on intercepting execve syscall

2003-11-16 Thread Kai Zhu
Hello all, I am writing a KLD module to intercept execve() as following: static int my_execve(struct thread *td, struct execve_args *uap) { return(execve(td,uap)); } As you can see, I first just want to make sure that my_execve won't affect the original execve, then I will add some new

Re: Questions on intercepting execve syscall

2003-11-16 Thread Murat Balaban
Hi, It might be that you have some bad address in the execve index of sysent array. See http://www.enderunix.org/murat/linux_subexec/linux_subexec.c for a simple example. PS: don't mind the naming :). On Sun, Nov 16, 2003 at 07:53:30AM -0800, Kai Zhu wrote: Hello all, I am writing a KLD

Re: Questions on intercepting execve syscall

2003-11-16 Thread Kai Zhu
Thanks Murat! I have tried your example, and fixed the problem of my code accordingly. Murat Balaban [EMAIL PROTECTED] wrote: Hi, It might be that you have some bad address in the execve index of sysent array. See http://www.enderunix.org/murat/linux_subexec/linux_subexec.c for a simple example.