Subject: Re: [PATCH 2/2] Create a new connector proc_event for successful calls to accept.

From: Samir Bellabes <[email-masked]>
Date: Wed, 03 Aug 2011 17:02:55 +0200

Joe Damato <[email-masked]> writes:

> diff --git a/net/socket.c b/net/socket.c
> index b4f9a6c..d21a266 100644
> --- a/net/socket.c
> +++ b/net/socket.c
> @@ -1544,6 +1544,9 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr,
>  			goto out_fd;
>  	}
>  
> +	proc_accept_connector(current, newsock,
> +			      (struct sockaddr *)&address, len);
> +
>  	/* File flags are not inherited via accept() unlike another OSes. */
>  
>  	fd_install(newfd, newfile);

Hi Joe,
adding a specific function here is not very suitable.
I have already proposed such a patch by adding my own hooks, then I
moved to the LSM hooks
http://www.mail-archive.com/[email-masked]/msg33814.html

I have rewrite the projet to directly use netlink socket (in fact
generic netlink socket) and move to a new protocol between userspace and
kernel
you can find patch here :
http://www.synack.fr/project/snet/snet.html

sam