1 /* LINTLIBRARY */
   2 /* PROTOLIB1 */
   3 
   4 /*
   5  * CDDL HEADER START
   6  *
   7  * The contents of this file are subject to the terms of the
   8  * Common Development and Distribution License (the "License").
   9  * You may not use this file except in compliance with the License.
  10  *
  11  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  12  * or http://www.opensolaris.org/os/licensing.
  13  * See the License for the specific language governing permissions
  14  * and limitations under the License.
  15  *
  16  * When distributing Covered Code, include this CDDL HEADER in each
  17  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  18  * If applicable, add the following below this CDDL HEADER, with the
  19  * fields enclosed by brackets "[]" replaced with your own identifying
  20  * information: Portions Copyright [yyyy] [name of copyright owner]
  21  *
  22  * CDDL HEADER END
  23  *
  24  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  25  * Use is subject to license terms.
  26  */
  27 
  28 #include <includes.h>
  29 #include <ssh.h>
  30 #include <atomicio.h>
  31 #include <auth.h>
  32 #include <auth-pam.h>
  33 #include <auth2-pam.h>
  34 #include <authfd.h>
  35 #include <authfile.h>
  36 #include <auth-options.h>
  37 #include <base64.h>
  38 #include <bindresvport.h>
  39 #include <bsd-arc4random.h>
  40 #include <bsd-cray.h>
  41 #include <bsd-cygwin_util.h>
  42 #include <bsd-getpeereid.h>
  43 #include <bsd-misc.h>
  44 #include <bsd-snprintf.h>
  45 #include <bsd-waitpid.h>
  46 #include <bufaux.h>
  47 #include <buffer.h>
  48 #include <canohost.h>
  49 #include <channels.h>
  50 #include <cipher.h>
  51 #include <clientloop.h>
  52 #include <compat.h>
  53 #include <compress.h>
  54 #include <config.h>
  55 #include <crc32.h>
  56 #include <deattack.h>
  57 #include <defines.h>
  58 #include <dh.h>
  59 #include <dirname.h>
  60 #include <dispatch.h>
  61 #include <entropy.h>
  62 #include <fake-gai-errnos.h>
  63 #include <fake-getaddrinfo.h>
  64 #include <fake-getnameinfo.h>
  65 #include <fake-socket.h>
  66 #include <g11n.h>
  67 #include <getcwd.h>
  68 #include <getgrouplist.h>
  69 #include <getopt.h>
  70 #include <getput.h>
  71 #include <glob.h>
  72 #include <groupaccess.h>
  73 #include <hostfile.h>
  74 #include <inet_ntoa.h>
  75 #include <inet_ntop.h>
  76 #include <kex.h>
  77 #include <key.h>
  78 #include <log.h>
  79 #include <loginrec.h>
  80 #include <mac.h>
  81 #include <match.h>
  82 #include <misc.h>
  83 #include <mktemp.h>
  84 #include <mpaux.h>
  85 #include <msg.h>
  86 #include <myproposal.h>
  87 #include <openbsd-compat.h>
  88 #include <packet.h>
  89 #include <pathnames.h>
  90 #include <port-aix.h>
  91 #include <port-irix.h>
  92 #include <proxy-io.h>
  93 #include <readconf.h>
  94 #include <readpass.h>
  95 #include <readpassphrase.h>
  96 #include <realpath.h>
  97 #include <rresvport.h>
  98 #include <rsa.h>
  99 #include <servconf.h>
 100 #include <serverloop.h>
 101 #include <session.h>
 102 #include <setproctitle.h>
 103 #include <sftp-common.h>
 104 #include <sftp.h>
 105 #include <sftp-client.h>
 106 #include <sigact.h>
 107 #include <ssh1.h>
 108 #include <ssh2.h>
 109 #include <sshconnect.h>
 110 #include <ssh-dss.h>
 111 #include <sshlogin.h>
 112 #include <sshpty.h>
 113 #include <ssh-rsa.h>
 114 #include <sshtty.h>
 115 #include <strlcat.h>
 116 #include <strlcpy.h>
 117 #include <strmode.h>
 118 #include <sys-queue.h>
 119 #include <sys-tree.h>
 120 #include <tildexpand.h>
 121 #include <uidswap.h>
 122 #include <uuencode.h>
 123 #include <version.h>
 124 #include <xlist.h>
 125 #include <xmalloc.h>
 126 #include <xmmap.h>
 127 
 128 extern uid_t original_real_uid;
 129 extern char *__progname;
 130