1 /* $MirOS: src/usr.bin/ssh/pathnames.h,v 1.6 2011/01/15 21:52:40 tg Exp $ */ 2 /* $OpenBSD: pathnames.h,v 1.17 2008/12/29 02:23:26 stevesk Exp $ */ 3 4 /* 5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 6 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 7 * All rights reserved 8 * 9 * As far as I am concerned, the code I have written for this software 10 * can be used freely for any purpose. Any derived versions of this 11 * software must be clearly marked as such, and if the derived work is 12 * incompatible with the protocol description in the RFC file, it must be 13 * called by a name other than "ssh" or "Secure Shell". 14 */ 15 16 #define ETCDIR "/etc" 17 #define SSHDIR ETCDIR "/ssh" 18 #define _PATH_SSH_PIDDIR "/var/run" 19 20 /* 21 * System-wide file containing host keys of known hosts. This file should be 22 * world-readable. 23 */ 24 #define _PATH_SSH_SYSTEM_HOSTFILE SSHDIR "/ssh_known_hosts" 25 /* backward compat for protocol 2 */ 26 #define _PATH_SSH_SYSTEM_HOSTFILE2 SSHDIR "/ssh_known_hosts2" 27 28 /* 29 * Of these, ssh_host_key must be readable only by root, whereas ssh_config 30 * should be world-readable. 31 */ 32 #define _PATH_SERVER_CONFIG_FILE SSHDIR "/sshd_config" 33 #define _PATH_HOST_CONFIG_FILE SSHDIR "/ssh_config" 34 #define _PATH_HOST_KEY_FILE SSHDIR "/ssh_host_key" 35 #define _PATH_HOST_DSA_KEY_FILE SSHDIR "/ssh_host_dsa_key" 36 #define _PATH_HOST_RSA_KEY_FILE SSHDIR "/ssh_host_rsa_key" 37 #define _PATH_DH_MODULI ETCDIR "/moduli" 38 /* Backwards compatibility */ 39 #define _PATH_DH_PRIMES ETCDIR "/primes" 40 41 #define _PATH_SSH_PROGRAM "/usr/bin/ssh" 42 43 /* 44 * The process id of the daemon listening for connections is saved here to 45 * make it easier to kill the correct daemon when necessary. 46 */ 47 #define _PATH_SSH_DAEMON_PID_FILE _PATH_SSH_PIDDIR "/sshd.pid" 48 49 /* 50 * The directory in user's home directory in which the files reside. The 51 * directory should be world-readable (though not all files are). 52 */ 53 #define _PATH_SSH_USER_DIR ".etc/ssh" 54 55 /* Prefix for configuration files for root, if his HOME is "/" */ 56 #define _PATH_SSH_ROOT_PFX SSHDIR "/root:" 57 58 /* 59 * Per-user file containing host keys of known hosts. This file need not be 60 * readable by anyone except the user him/herself, though this does not 61 * contain anything particularly secret. 62 */ 63 #define _PATH_SSH_USER_HOSTFILE "~/.etc/ssh/known_hosts" 64 /* backward compat for protocol 2 */ 65 #define _PATH_SSH_USER_HOSTFILE2 "~/.etc/ssh/known_hosts2" 66 67 /* for root with HOME=/ */ 68 #define _PATH_SSH_ROOT_HOSTFILE _PATH_SSH_ROOT_PFX "known_hosts" 69 70 /* 71 * Name of the default file containing client-side authentication key. This 72 * file should only be readable by the user him/herself. 73 */ 74 #define _PATH_SSH_CLIENT_IDENTITY ".etc/ssh/identity" 75 #define _PATH_SSH_CLIENT_ID_DSA ".etc/ssh/id_dsa" 76 #define _PATH_SSH_CLIENT_ID_RSA ".etc/ssh/id_rsa" 77 78 /* 79 * Configuration file in user's home directory. This file need not be 80 * readable by anyone but the user him/herself, but does not contain anything 81 * particularly secret. If the user's home directory resides on an NFS 82 * volume where root is mapped to nobody, this may need to be world-readable. 83 */ 84 #define _PATH_SSH_USER_CONFFILE ".etc/ssh/config" 85 86 /* for root with HOME=/ */ 87 #define _PATH_SSH_ROOT_CONFFILE _PATH_SSH_ROOT_PFX "config" 88 89 /* 90 * File containing a list of those rsa keys that permit logging in as this 91 * user. This file need not be readable by anyone but the user him/herself, 92 * but does not contain anything particularly secret. If the user's home 93 * directory resides on an NFS volume where root is mapped to nobody, this 94 * may need to be world-readable. (This file is read by the daemon which is 95 * running as root.) 96 */ 97 #define _PATH_SSH_USER_PERMITTED_KEYS ".etc/ssh/authorised_keys" 98 99 /* rarely known feature */ 100 #define _PATH_SSH_USER_PERMITTED_KEYS2 ".ssh/authorized_keys" 101 102 /* for root with HOME=/ */ 103 #define _PATH_SSH_ROOT_PERMITTED_KEYS _PATH_SSH_ROOT_PFX "authorised_keys" 104 105 /* 106 * Per-user and system-wide ssh "rc" files. These files are executed with 107 * /bin/sh before starting the shell or command if they exist. They will be 108 * passed "proto cookie" as arguments if X11 forwarding with spoofing is in 109 * use. xauth will be run if neither of these exists. 110 */ 111 #define _PATH_SSH_USER_RC ".etc/ssh/rc" 112 #define _PATH_SSH_SYSTEM_RC SSHDIR "/sshrc" 113 114 /* 115 * Ssh-only version of /etc/hosts.equiv. Additionally, the daemon may use 116 * ~/.rhosts and /etc/hosts.equiv if rhosts authentication is enabled. 117 */ 118 #define _PATH_SSH_HOSTS_EQUIV ETCDIR "/shosts.equiv" 119 #define _PATH_RHOSTS_EQUIV "/etc/hosts.equiv" 120 121 /* 122 * Default location of askpass 123 */ 124 #define _PATH_SSH_ASKPASS_DEFAULT "/usr/X11R6/bin/ssh-askpass" 125 126 /* Location of ssh-keysign for hostbased authentication */ 127 #define _PATH_SSH_KEY_SIGN "/usr/libexec/ssh-keysign" 128 129 /* xauth for X11 forwarding */ 130 #define _PATH_XAUTH "/usr/X11R6/bin/xauth" 131 132 /* UNIX domain socket for X11 server; displaynum will replace %u */ 133 #define _PATH_UNIX_X "/tmp/.X11-unix/X%u" 134 135 /* for scp */ 136 #define _PATH_CP "cp" 137 138 /* for sftp */ 139 #define _PATH_SFTP_SERVER "/usr/libexec/sftp-server" 140 #define _PATH_LS "ls" 141 142 /* chroot directory for unprivileged user when UsePrivilegeSeparation=yes */ 143 #define _PATH_PRIVSEP_CHROOT_DIR "/var/empty" 144 145 /* for passwd change */ 146 #define _PATH_PASSWD_PROG "/usr/bin/passwd" 147