Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src Pullup ticket #927:



details:   https://anonhg.NetBSD.org/src/rev/5d03394d5b43
branches:  netbsd-6
changeset: 776412:5d03394d5b43
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Aug 02 20:12:30 2013 +0000

description:
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.

diffstat:

 doc/CHANGES-6.2        |  7 ++++++-
 sys/kern/uipc_socket.c |  6 +++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r 54080a8bed85 -r 5d03394d5b43 doc/CHANGES-6.2
--- a/doc/CHANGES-6.2   Tue Jul 30 08:22:28 2013 +0000
+++ b/doc/CHANGES-6.2   Fri Aug 02 20:12:30 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.27 2013/07/30 08:22:28 msaitoh Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.28 2013/08/02 20:12:30 martin Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -451,3 +451,8 @@
 
        Restore libresolv missing bits, including NS updates.
        [manu, ticket #887]
+
+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]
diff -r 54080a8bed85 -r 5d03394d5b43 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c    Tue Jul 30 08:22:28 2013 +0000
+++ b/sys/kern/uipc_socket.c    Fri Aug 02 20:12:30 2013 +0000
@@ -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.3 2013/08/02 20:12:30 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.3 2013/08/02 20:12:30 martin Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_sock_counters.h"
@@ -416,7 +416,7 @@
                /* 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;



Home | Main Index | Thread Index | Old Index