[PLUG] socketcall hook
deepak_cins at yahoo.co.in
Wed Apr 4 01:20:42 PDT 2007
I am tring to hook socket system call and want to add some extra functionality But i am not able to link sys_bind() function in socketcall. It says unresolved symbol.
The code is as given below.
unsigned long a;
unsigned long a0,a1;
int err, check_family = 0;
struct sockaddr_un *sunaddr = NULL;
if (copy_from_user(a, args, nargs[call]))
sunaddr = (struct sockaddr_un *)a1;
if(sunaddr->sun_family == AF_UNIX)
check_family = 1;
err = sys_bind(a0,(struct sockaddr __user *)a1, a);
What might be the cause of not linking this call ?
In order to get it work, i copied the sys_bind() call from the socket.c file to the .c file that i am using. Now the system is working fine. Is this approach is correct one ? or will it create some problems in future.
One more thing is sys_bind() is not defined as static.
All New Yahoo! Mail Tired of unwanted email come-ons? Let our SpamGuard protect you.
More information about the plug-mail