From owner-cvs-src-old@FreeBSD.ORG Thu Feb 5 14:10:23 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB98310656D2 for ; Thu, 5 Feb 2009 14:10:23 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id BABFE8FC08 for ; Thu, 5 Feb 2009 14:10:23 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n15EANG0048301 for ; Thu, 5 Feb 2009 14:10:23 GMT (envelope-from jamie@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n15EAN8O048300 for cvs-src-old@freebsd.org; Thu, 5 Feb 2009 14:10:23 GMT (envelope-from jamie@repoman.freebsd.org) Message-Id: <200902051410.n15EAN8O048300@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jamie@repoman.freebsd.org using -f From: Jamie Gritton Date: Thu, 5 Feb 2009 14:06:09 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libc/sys send.2 src/sys/kern kern_jail.c src/sys/net if.c rtsock.c src/sys/netinet in.c in_pcb.c raw_ip.c tcp_usrreq.c udp_usrreq.c src/sys/netinet6 in6.c in6_pcb.c in6_src.c raw_ip6.c udp6_usrreq.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Feb 2009 14:10:24 -0000 jamie 2009-02-05 14:06:09 UTC FreeBSD src repository Modified files: lib/libc/sys send.2 sys/kern kern_jail.c sys/net if.c rtsock.c sys/netinet in.c in_pcb.c raw_ip.c tcp_usrreq.c udp_usrreq.c sys/netinet6 in6.c in6_pcb.c in6_src.c raw_ip6.c udp6_usrreq.c Log: SVN rev 188144 on 2009-02-05 14:06:09Z by jamie Standardize the various prison_foo_ip[46] functions and prison_if to return zero on success and an error code otherwise. The possible errors are EADDRNOTAVAIL if an address being checked for doesn't match the prison, and EAFNOSUPPORT if the prison doesn't have any addresses in that address family. For most callers of these functions, use the returned error code instead of e.g. a hard-coded EADDRNOTAVAIL or EINVAL. Always include a jailed() check in these functions, where a non-jailed cred always returns success (and makes no changes). Remove the explicit jailed() checks that preceded many of the function calls. Approved by: bz (mentor) Revision Changes Path 1.37 +2 -2 src/lib/libc/sys/send.2 1.94 +74 -70 src/sys/kern/kern_jail.c 1.307 +1 -2 src/sys/net/if.c 1.166 +15 -14 src/sys/net/rtsock.c 1.120 +4 -5 src/sys/netinet/in.c 1.241 +28 -29 src/sys/netinet/in_pcb.c 1.205 +17 -20 src/sys/netinet/raw_ip.c 1.181 +5 -8 src/sys/netinet/tcp_usrreq.c 1.248 +5 -5 src/sys/netinet/udp_usrreq.c 1.99 +4 -5 src/sys/netinet6/in6.c 1.108 +16 -18 src/sys/netinet6/in6_pcb.c 1.66 +11 -12 src/sys/netinet6/in6_src.c 1.100 +7 -11 src/sys/netinet6/raw_ip6.c 1.106 +6 -10 src/sys/netinet6/udp6_usrreq.c