Deleted Added
full compact
rshd.c (31490) rshd.c (35728)
1/*-
2 * Copyright (c) 1988, 1989, 1992, 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

--- 28 unchanged lines hidden (view full) ---

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static const char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94";
43#endif
44static const char rcsid[] =
1/*-
2 * Copyright (c) 1988, 1989, 1992, 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

--- 28 unchanged lines hidden (view full) ---

37 The Regents of the University of California. All rights reserved.\n";
38#endif /* not lint */
39
40#ifndef lint
41#if 0
42static const char sccsid[] = "@(#)rshd.c 8.2 (Berkeley) 4/6/94";
43#endif
44static const char rcsid[] =
45 "$Id$";
45 "$Id: rshd.c,v 1.20 1997/12/02 12:30:04 charnier Exp $";
46#endif /* not lint */
47
48/*
49 * remote shell server:
50 * [port]\0
51 * remuser\0
52 * locuser\0
53 * command\0

--- 112 unchanged lines hidden (view full) ---

166 exit(2);
167 }
168#endif
169#endif
170
171 fromlen = sizeof (from);
172 if (getpeername(0, (struct sockaddr *)&from, &fromlen) < 0) {
173 syslog(LOG_ERR, "getpeername: %m");
46#endif /* not lint */
47
48/*
49 * remote shell server:
50 * [port]\0
51 * remuser\0
52 * locuser\0
53 * command\0

--- 112 unchanged lines hidden (view full) ---

166 exit(2);
167 }
168#endif
169#endif
170
171 fromlen = sizeof (from);
172 if (getpeername(0, (struct sockaddr *)&from, &fromlen) < 0) {
173 syslog(LOG_ERR, "getpeername: %m");
174 _exit(1);
174 exit(1);
175 }
176 if (keepalive &&
177 setsockopt(0, SOL_SOCKET, SO_KEEPALIVE, (char *)&on,
178 sizeof(on)) < 0)
179 syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m");
180 linger.l_onoff = 1;
181 linger.l_linger = 60; /* XXX */
182 if (setsockopt(0, SOL_SOCKET, SO_LINGER, (char *)&linger,

--- 683 unchanged lines hidden ---
175 }
176 if (keepalive &&
177 setsockopt(0, SOL_SOCKET, SO_KEEPALIVE, (char *)&on,
178 sizeof(on)) < 0)
179 syslog(LOG_WARNING, "setsockopt (SO_KEEPALIVE): %m");
180 linger.l_onoff = 1;
181 linger.l_linger = 60; /* XXX */
182 if (setsockopt(0, SOL_SOCKET, SO_LINGER, (char *)&linger,

--- 683 unchanged lines hidden ---