Module Name:    src
Committed By:   martin
Date:           Fri Aug  2 20:18:48 UTC 2013

Modified Files:
        src/doc [netbsd-6-1]: CHANGES-6.1.1
        src/sys/kern [netbsd-6-1]: uipc_socket.c

Log Message:
Pullup ticket #927:

sys/kern/uipc_socket.c                          1.216

        Fix an inversion in checking for authorization to drop TCP connections
        found (and the obvious fix suggested) by Sander Bos.

Requested by spz.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.15 -r1.1.2.16 src/doc/CHANGES-6.1.1
cvs rdiff -u -r1.209.2.2 -r1.209.2.2.2.1 src/sys/kern/uipc_socket.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-6.1.1
diff -u src/doc/CHANGES-6.1.1:1.1.2.15 src/doc/CHANGES-6.1.1:1.1.2.16
--- src/doc/CHANGES-6.1.1:1.1.2.15	Tue Jul 30 04:08:45 2013
+++ src/doc/CHANGES-6.1.1	Fri Aug  2 20:18:48 2013
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.1,v 1.1.2.15 2013/07/30 04:08:45 msaitoh Exp $
+# $NetBSD: CHANGES-6.1.1,v 1.1.2.16 2013/08/02 20:18:48 martin Exp $
 
 A complete list of changes from the NetBSD 6.1 release to the NetBSD 6.1.1
 release:
@@ -168,3 +168,9 @@ sys/net/if_mpls.c				1.9
 
 	Stop abusing kmem during softint context to prevent panic.
 	[kefren, ticket #921]
+
+sys/kern: uipc_socket.c				1.216
+
+	Fix an inversion in checking for authorization to drop TCP connections
+	found (and the obvious fix suggested) by Sander Bos.
+	[spz, ticket #927]

Index: src/sys/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.209.2.2 src/sys/kern/uipc_socket.c:1.209.2.2.2.1
--- src/sys/kern/uipc_socket.c:1.209.2.2	Thu Feb 14 22:13:59 2013
+++ src/sys/kern/uipc_socket.c	Fri Aug  2 20:18:48 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.209.2.2 2013/02/14 22:13:59 jdc Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.209.2.2.2.1 2013/08/02 20:18:48 martin Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.209.2.2 2013/02/14 22:13:59 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.209.2.2.2.1 2013/08/02 20:18:48 martin Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_sock_counters.h"
@@ -416,7 +416,7 @@ socket_listener_cb(kauth_cred_t cred, ka
 		/* Normal users can only drop their own connections. */
 		struct socket *so = (struct socket *)arg1;
 
-		if (proc_uidmatch(cred, so->so_cred))
+		if (proc_uidmatch(cred, so->so_cred) == 0)
 			result = KAUTH_RESULT_ALLOW;
 
 		break;

Reply via email to