patch-1.3.8 linux/net/ipv4/af_inet.c

Next file: linux/net/ipv4/ip.c
Previous file: linux/net/core/sock.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.7/linux/net/ipv4/af_inet.c linux/net/ipv4/af_inet.c
@@ -1280,7 +1280,7 @@
 {
 	struct sock *sk=(struct sock *)sock->data;
 	int err;
-	int tmp;
+	int pid;
 
 	switch(cmd) 
 	{
@@ -1289,11 +1289,11 @@
 			err=verify_area(VERIFY_READ,(int *)arg,sizeof(long));
 			if(err)
 				return err;
-			tmp = get_fs_long((int *) arg);
+			pid = get_user((int *) arg);
 			/* see inet_fcntl */
-			if (current->pid != tmp && current->pgrp != -tmp && !suser())
+			if (current->pid != pid && current->pgrp != -pid && !suser())
 				return -EPERM;
-			sk->proc = tmp;
+			sk->proc = pid;
 			return(0);
 		case FIOGETOWN:
 		case SIOCGPGRP:

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this