Linux-kernel mailing list archive 2000-40,: execve replacement.

# execve replacement.

=?iso-8859-1?Q?Abel_Mu=F1oz_Alcaraz?= (abel@trymedia.com)
Wed, 4 Oct 2000 15:15:37 +0200

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Brian Gerst: "Re: execve replacement."
- Previous message: Horst von Brand: "Re: Why does everyone hate gcc 2.95?"
- Next in thread: Brian Gerst: "Re: execve replacement."
- Reply: Brian Gerst: "Re: execve replacement."
- Reply: Brian Gerst: "Re: execve replacement."
- Reply: Brian Gerst: "Re: execve replacement."
- Reply: Daniel Phillips: "Re: execve replacement."
- Reply: David Wagner: "Re: execve replacement."

Hi everybody,

I have replaced the execve() kernel API with my own implementation but it
doesn't work well.

extern void * sys_call_table[]

asmlinkage int (*system_execve)(const char *, const char **, const char
**);

asmlinkage int my_execve(const char * filename, const char **argv, const
char **envp)
{
return system_execve(filename, argv, envp);
}

int init_module()
{
system_execve = sys_call_table[__NR_execve];
sys_call_table[__NR_execve] = my_execve;
}

void cleanup_module()
{
sys_call_table[__NR_execve] = system_execve;
}

Does anybody know where is the problem?

Thanks in advance.

-Abel.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

- Next message: Brian Gerst: "Re: execve replacement."
- Previous message: Horst von Brand: "Re: Why does everyone hate gcc 2.95?"
- Next in thread: Brian Gerst: "Re: execve replacement."
- Reply: Brian Gerst: "Re: execve replacement."
- Reply: Brian Gerst: "Re: execve replacement."
- Reply: Brian Gerst: "Re: execve replacement."
- Reply: Daniel Phillips: "Re: execve replacement."
- Reply: David Wagner: "Re: execve replacement."