rsh.c (93412) | rsh.c (96196) |
---|---|
1/*- 2 * Copyright (c) 1983, 1990, 1993, 1994 3 * The Regents of the University of California. All rights reserved. | 1/*- 2 * Copyright (c) 1983, 1990, 1993, 1994 3 * The Regents of the University of California. All rights reserved. |
4 * Copyright (c) 2002 Networks Associates Technology, Inc. 5 * All rights reserved. |
|
4 * | 6 * |
7 * Portions of this software were developed for the FreeBSD Project by 8 * ThinkSec AS and NAI Labs, the Security Research Division of Network 9 * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 10 * ("CBOSS"), as part of the DARPA CHATS research program. 11 * |
|
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 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. --- 24 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 41static const char sccsid[] = "From: @(#)rsh.c 8.3 (Berkeley) 4/6/94"; 42#endif /* not lint */ 43 44#include <sys/cdefs.h> | 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright 16 * notice, this list of conditions and the following disclaimer. 17 * 2. Redistributions in binary form must reproduce the above copyright 18 * notice, this list of conditions and the following disclaimer in the 19 * documentation and/or other materials provided with the distribution. --- 24 unchanged lines hidden (view full) --- 44 The Regents of the University of California. All rights reserved.\n"; 45#endif /* not lint */ 46 47#ifndef lint 48static const char sccsid[] = "From: @(#)rsh.c 8.3 (Berkeley) 4/6/94"; 49#endif /* not lint */ 50 51#include <sys/cdefs.h> |
45__FBSDID("$FreeBSD: head/usr.bin/rsh/rsh.c 93412 2002-03-30 08:51:21Z obrien $"); | 52__FBSDID("$FreeBSD: head/usr.bin/rsh/rsh.c 96196 2002-05-08 00:47:01Z des $"); |
46 47#include <sys/param.h> 48#include <sys/signal.h> 49#include <sys/socket.h> 50#include <sys/ioctl.h> 51#include <sys/file.h> 52#include <sys/time.h> 53 54#include <netinet/in.h> 55#include <netdb.h> 56 57#include <err.h> 58#include <errno.h> 59#include <libutil.h> | 53 54#include <sys/param.h> 55#include <sys/signal.h> 56#include <sys/socket.h> 57#include <sys/ioctl.h> 58#include <sys/file.h> 59#include <sys/time.h> 60 61#include <netinet/in.h> 62#include <netdb.h> 63 64#include <err.h> 65#include <errno.h> 66#include <libutil.h> |
67#include <paths.h> |
|
60#include <pwd.h> 61#include <signal.h> 62#include <stdio.h> 63#include <stdlib.h> 64#include <string.h> 65#include <unistd.h> 66#include <err.h> 67 | 68#include <pwd.h> 69#include <signal.h> 70#include <stdio.h> 71#include <stdlib.h> 72#include <string.h> 73#include <unistd.h> 74#include <err.h> 75 |
68#include "pathnames.h" 69 | |
70#ifdef KERBEROS 71#include <openssl/des.h> 72#include <krb.h> 73#include "krb.h" 74 75CREDENTIALS cred; 76Key_schedule schedule; 77int use_kerberos = 1, doencrypt; --- 230 unchanged lines hidden (view full) --- 308 if (signal(SIGTERM, SIG_IGN) != SIG_IGN) 309 (void)signal(SIGTERM, sendsig); 310 311 if (!nflag) { 312 pid = fork(); 313 if (pid < 0) 314 err(1, "fork"); 315 } | 76#ifdef KERBEROS 77#include <openssl/des.h> 78#include <krb.h> 79#include "krb.h" 80 81CREDENTIALS cred; 82Key_schedule schedule; 83int use_kerberos = 1, doencrypt; --- 230 unchanged lines hidden (view full) --- 314 if (signal(SIGTERM, SIG_IGN) != SIG_IGN) 315 (void)signal(SIGTERM, sendsig); 316 317 if (!nflag) { 318 pid = fork(); 319 if (pid < 0) 320 err(1, "fork"); 321 } |
316 else | 322 else |
317 (void)shutdown(rem, 1); 318 319#ifdef KERBEROS 320#ifdef CRYPT 321 if (!doencrypt) 322#endif 323#endif 324 { --- 167 unchanged lines hidden (view full) --- 492#else 493 "", " [-k realm] "); 494#endif 495#else 496 "", " "); 497#endif 498 exit(1); 499} | 323 (void)shutdown(rem, 1); 324 325#ifdef KERBEROS 326#ifdef CRYPT 327 if (!doencrypt) 328#endif 329#endif 330 { --- 167 unchanged lines hidden (view full) --- 498#else 499 "", " [-k realm] "); 500#endif 501#else 502 "", " "); 503#endif 504 exit(1); 505} |
500 | |