rcmd.c (56590) | rcmd.c (56629) |
---|---|
1/* 2 * Copyright (c) 1983, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/* 2 * Copyright (c) 1983, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/lib/libc/net/rcmd.c 56590 2000-01-25 14:52:10Z shin $ | 33 * $FreeBSD: head/lib/libc/net/rcmd.c 56629 2000-01-26 09:02:42Z shin $ |
34 */ 35 36#if defined(LIBC_SCCS) && !defined(lint) 37static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94"; 38#endif /* LIBC_SCCS and not lint */ 39 40#include <sys/param.h> 41#include <sys/socket.h> --- 286 unchanged lines hidden (view full) --- 328 if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0) 329 return (s); 330 if (errno != EADDRINUSE) { 331 (void)_libc_close(s); 332 return (-1); 333 } 334#endif 335 *sport = 0; | 34 */ 35 36#if defined(LIBC_SCCS) && !defined(lint) 37static char sccsid[] = "@(#)rcmd.c 8.3 (Berkeley) 3/26/94"; 38#endif /* LIBC_SCCS and not lint */ 39 40#include <sys/param.h> 41#include <sys/socket.h> --- 286 unchanged lines hidden (view full) --- 328 if (bind(s, (struct sockaddr *)&sin, sizeof(sin)) >= 0) 329 return (s); 330 if (errno != EADDRINUSE) { 331 (void)_libc_close(s); 332 return (-1); 333 } 334#endif 335 *sport = 0; |
336 if (bindresvport2(s, (struct sockaddr *)&ss, 337 ((struct sockaddr *)&ss)->sa_len) == -1) { | 336 if (bindresvport_sa(s, (struct sockaddr *)&ss, 337 ((struct sockaddr *)&ss)->sa_len) == -1) { |
338 (void)_libc_close(s); 339 return (-1); 340 } 341 *alport = (int)ntohs(*sport); 342 return (s); 343} 344 345int __check_rhosts_file = 1; --- 315 unchanged lines hidden --- | 338 (void)_libc_close(s); 339 return (-1); 340 } 341 *alport = (int)ntohs(*sport); 342 return (s); 343} 344 345int __check_rhosts_file = 1; --- 315 unchanged lines hidden --- |