From b4a12df8bbf12325135d03f0975d456d34d575a7 Mon Sep 17 00:00:00 2001 From: wollman Date: Thu, 21 Sep 1995 17:55:49 +0000 Subject: Merge 4.4-Lite-2: use M_NOWAIT in in_pcballoc(), and return EACCES rather than EPERM on illegal attempt to bind a reserved port. Obtained from: 4.4BSD-Lite-2 --- sys/netinet/in_pcb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/netinet/in_pcb.c') diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 6f8fe0e..834f13a 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1982, 1986, 1991, 1993 + * Copyright (c) 1982, 1986, 1991, 1993, 1995 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,8 +30,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)in_pcb.c 8.2 (Berkeley) 1/4/94 - * $Id: in_pcb.c,v 1.11 1995/05/03 07:16:51 davidg Exp $ + * @(#)in_pcb.c 8.4 (Berkeley) 5/24/95 + * $Id: in_pcb.c,v 1.12 1995/05/30 08:09:28 rgrimes Exp $ */ #include @@ -137,7 +137,7 @@ in_pcbbind(inp, nam) /* GROSS */ if (ntohs(lport) < IPPORT_RESERVED && (error = suser(p->p_ucred, &p->p_acflag))) - return (error); + return (EACCES); t = in_pcblookup(head, zeroin_addr, 0, sin->sin_addr, lport, wild); if (t && (reuseport & t->inp_socket->so_options) == 0) -- cgit v1.1