Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet Implement curtain for AF_INET{, 6} PCB lists.



details:   https://anonhg.NetBSD.org/src/rev/209c02c6d6d0
branches:  trunk
changeset: 584081:209c02c6d6d0
user:      elad <elad%NetBSD.org@localhost>
date:      Wed Sep 07 17:58:13 2005 +0000

description:
Implement curtain for AF_INET{,6} PCB lists.

diffstat:

 sys/netinet/tcp_usrreq.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r edeaca1f3743 -r 209c02c6d6d0 sys/netinet/tcp_usrreq.c
--- a/sys/netinet/tcp_usrreq.c  Wed Sep 07 17:38:44 2005 +0000
+++ b/sys/netinet/tcp_usrreq.c  Wed Sep 07 17:58:13 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_usrreq.c,v 1.110 2005/09/06 02:57:04 rpaulo Exp $  */
+/*     $NetBSD: tcp_usrreq.c,v 1.111 2005/09/07 17:58:13 elad Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -100,7 +100,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.110 2005/09/06 02:57:04 rpaulo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.111 2005/09/07 17:58:13 elad Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -1247,6 +1247,10 @@
                if (inph->inph_af != pf)
                        continue;
 
+               if (CURTAIN(l->l_proc->p_ucred->cr_uid,
+                           inph->inph_socket->so_uidinfo->ui_uid))
+                       continue;
+
                memset(&pcb, 0, sizeof(pcb));
 
                pcb.ki_family = pf;



Home | Main Index | Thread Index | Old Index