pathnames.h revision 221420
1326938Sdim/* $OpenBSD: pathnames.h,v 1.20 2010/08/31 11:54:45 djm Exp $ */ 2326938Sdim 3353358Sdim/* 4353358Sdim * Author: Tatu Ylonen <ylo@cs.hut.fi> 5353358Sdim * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 6326938Sdim * All rights reserved 7326938Sdim * 8326938Sdim * As far as I am concerned, the code I have written for this software 9326938Sdim * can be used freely for any purpose. Any derived versions of this 10326938Sdim * software must be clearly marked as such, and if the derived work is 11326938Sdim * incompatible with the protocol description in the RFC file, it must be 12326938Sdim * called by a name other than "ssh" or "Secure Shell". 13326938Sdim */ 14326938Sdim 15326938Sdim#define ETCDIR "/etc" 16326938Sdim 17326938Sdim#ifndef SSHDIR 18326938Sdim#define SSHDIR ETCDIR "/ssh" 19326938Sdim#endif 20326938Sdim 21326938Sdim#ifndef _PATH_SSH_PIDDIR 22326938Sdim#define _PATH_SSH_PIDDIR "/var/run" 23326938Sdim#endif 24326938Sdim 25326938Sdim/* 26326938Sdim * System-wide file containing host keys of known hosts. This file should be 27326938Sdim * world-readable. 28326938Sdim */ 29326938Sdim#define _PATH_SSH_SYSTEM_HOSTFILE SSHDIR "/ssh_known_hosts" 30326938Sdim/* backward compat for protocol 2 */ 31326938Sdim#define _PATH_SSH_SYSTEM_HOSTFILE2 SSHDIR "/ssh_known_hosts2" 32326938Sdim 33326938Sdim/* 34326938Sdim * Of these, ssh_host_key must be readable only by root, whereas ssh_config 35326938Sdim * should be world-readable. 36326938Sdim */ 37326938Sdim#define _PATH_SERVER_CONFIG_FILE SSHDIR "/sshd_config" 38326938Sdim#define _PATH_HOST_CONFIG_FILE SSHDIR "/ssh_config" 39326938Sdim#define _PATH_HOST_KEY_FILE SSHDIR "/ssh_host_key" 40326938Sdim#define _PATH_HOST_DSA_KEY_FILE SSHDIR "/ssh_host_dsa_key" 41326938Sdim#define _PATH_HOST_ECDSA_KEY_FILE SSHDIR "/ssh_host_ecdsa_key" 42326938Sdim#define _PATH_HOST_RSA_KEY_FILE SSHDIR "/ssh_host_rsa_key" 43326938Sdim#define _PATH_DH_MODULI SSHDIR "/moduli" 44326938Sdim/* Backwards compatibility */ 45326938Sdim#define _PATH_DH_PRIMES SSHDIR "/primes" 46326938Sdim 47326938Sdim#ifndef _PATH_SSH_PROGRAM 48326938Sdim#define _PATH_SSH_PROGRAM "/usr/bin/ssh" 49326938Sdim#endif 50326938Sdim 51326938Sdim/* 52326938Sdim * The process id of the daemon listening for connections is saved here to 53326938Sdim * make it easier to kill the correct daemon when necessary. 54326938Sdim */ 55326938Sdim#define _PATH_SSH_DAEMON_PID_FILE _PATH_SSH_PIDDIR "/sshd.pid" 56326938Sdim 57326938Sdim/* 58326938Sdim * The directory in user's home directory in which the files reside. The 59326938Sdim * directory should be world-readable (though not all files are). 60326938Sdim */ 61326938Sdim#define _PATH_SSH_USER_DIR ".ssh" 62326938Sdim 63326938Sdim/* 64326938Sdim * Per-user file containing host keys of known hosts. This file need not be 65326938Sdim * readable by anyone except the user him/herself, though this does not 66326938Sdim * contain anything particularly secret. 67326938Sdim */ 68326938Sdim#define _PATH_SSH_USER_HOSTFILE "~/.ssh/known_hosts" 69326938Sdim/* backward compat for protocol 2 */ 70326938Sdim#define _PATH_SSH_USER_HOSTFILE2 "~/.ssh/known_hosts2" 71326938Sdim 72326938Sdim/* 73326938Sdim * Name of the default file containing client-side authentication key. This 74326938Sdim * file should only be readable by the user him/herself. 75326938Sdim */ 76326938Sdim#define _PATH_SSH_CLIENT_IDENTITY ".ssh/identity" 77326938Sdim#define _PATH_SSH_CLIENT_ID_DSA ".ssh/id_dsa" 78326938Sdim#define _PATH_SSH_CLIENT_ID_ECDSA ".ssh/id_ecdsa" 79326938Sdim#define _PATH_SSH_CLIENT_ID_RSA ".ssh/id_rsa" 80326938Sdim 81326938Sdim/* 82326938Sdim * Configuration file in user's home directory. This file need not be 83326938Sdim * readable by anyone but the user him/herself, but does not contain anything 84326938Sdim * particularly secret. If the user's home directory resides on an NFS 85326938Sdim * volume where root is mapped to nobody, this may need to be world-readable. 86326938Sdim */ 87326938Sdim#define _PATH_SSH_USER_CONFFILE ".ssh/config" 88326938Sdim 89326938Sdim/* 90326938Sdim * File containing a list of those rsa keys that permit logging in as this 91326938Sdim * user. This file need not be readable by anyone but the user him/herself, 92326938Sdim * but does not contain anything particularly secret. If the user's home 93326938Sdim * directory resides on an NFS volume where root is mapped to nobody, this 94326938Sdim * may need to be world-readable. (This file is read by the daemon which is 95326938Sdim * running as root.) 96326938Sdim */ 97326938Sdim#define _PATH_SSH_USER_PERMITTED_KEYS ".ssh/authorized_keys" 98326938Sdim 99326938Sdim/* backward compat for protocol v2 */ 100326938Sdim#define _PATH_SSH_USER_PERMITTED_KEYS2 ".ssh/authorized_keys2" 101326938Sdim 102326938Sdim/* 103326938Sdim * Per-user and system-wide ssh "rc" files. These files are executed with 104326938Sdim * /bin/sh before starting the shell or command if they exist. They will be 105326938Sdim * passed "proto cookie" as arguments if X11 forwarding with spoofing is in 106326938Sdim * use. xauth will be run if neither of these exists. 107326938Sdim */ 108326938Sdim#define _PATH_SSH_USER_RC ".ssh/rc" 109326938Sdim#define _PATH_SSH_SYSTEM_RC SSHDIR "/sshrc" 110326938Sdim 111326938Sdim/* 112326938Sdim * Ssh-only version of /etc/hosts.equiv. Additionally, the daemon may use 113326938Sdim * ~/.rhosts and /etc/hosts.equiv if rhosts authentication is enabled. 114326938Sdim */ 115326938Sdim#define _PATH_SSH_HOSTS_EQUIV SSHDIR "/shosts.equiv" 116326938Sdim#define _PATH_RHOSTS_EQUIV "/etc/hosts.equiv" 117326938Sdim 118326938Sdim/* 119326938Sdim * Default location of askpass 120326938Sdim */ 121326938Sdim#ifndef _PATH_SSH_ASKPASS_DEFAULT 122326938Sdim#define _PATH_SSH_ASKPASS_DEFAULT "/usr/local/bin/ssh-askpass" 123326938Sdim#endif 124326938Sdim 125326938Sdim/* Location of ssh-keysign for hostbased authentication */ 126326938Sdim#ifndef _PATH_SSH_KEY_SIGN 127326938Sdim#define _PATH_SSH_KEY_SIGN "/usr/libexec/ssh-keysign" 128326938Sdim#endif 129326938Sdim 130326938Sdim/* Location of ssh-pkcs11-helper to support keys in tokens */ 131326938Sdim#ifndef _PATH_SSH_PKCS11_HELPER 132326938Sdim#define _PATH_SSH_PKCS11_HELPER "/usr/libexec/ssh-pkcs11-helper" 133326938Sdim#endif 134326938Sdim 135326938Sdim/* xauth for X11 forwarding */ 136326938Sdim#ifndef _PATH_XAUTH 137326938Sdim#define _PATH_XAUTH "/usr/local/bin/xauth" 138326938Sdim#endif 139326938Sdim 140326938Sdim/* UNIX domain socket for X11 server; displaynum will replace %u */ 141326938Sdim#ifndef _PATH_UNIX_X 142326938Sdim#define _PATH_UNIX_X "/tmp/.X11-unix/X%u" 143326938Sdim#endif 144326938Sdim 145326938Sdim/* for scp */ 146326938Sdim#ifndef _PATH_CP 147326938Sdim#define _PATH_CP "cp" 148326938Sdim#endif 149326938Sdim 150326938Sdim/* for sftp */ 151326938Sdim#ifndef _PATH_SFTP_SERVER 152326938Sdim#define _PATH_SFTP_SERVER "/usr/libexec/sftp-server" 153326938Sdim#endif 154326938Sdim 155326938Sdim/* chroot directory for unprivileged user when UsePrivilegeSeparation=yes */ 156326938Sdim#ifndef _PATH_PRIVSEP_CHROOT_DIR 157326938Sdim#define _PATH_PRIVSEP_CHROOT_DIR "/var/empty" 158326938Sdim#endif 159326938Sdim 160326938Sdim/* for passwd change */ 161326938Sdim#ifndef _PATH_PASSWD_PROG 162326938Sdim#define _PATH_PASSWD_PROG "/usr/bin/passwd" 163326938Sdim#endif 164326938Sdim 165326938Sdim#ifndef _PATH_LS 166326938Sdim#define _PATH_LS "ls" 167326938Sdim#endif 168326938Sdim 169326938Sdim/* path to login program */ 170326938Sdim#ifndef LOGIN_PROGRAM 171326938Sdim# ifdef LOGIN_PROGRAM_FALLBACK 172326938Sdim# define LOGIN_PROGRAM LOGIN_PROGRAM_FALLBACK 173326938Sdim# else 174326938Sdim# define LOGIN_PROGRAM "/usr/bin/login" 175326938Sdim# endif 176326938Sdim#endif /* LOGIN_PROGRAM */ 177326938Sdim 178326938Sdim/* Askpass program define */ 179326938Sdim#ifndef ASKPASS_PROGRAM 180326938Sdim#define ASKPASS_PROGRAM "/usr/lib/ssh/ssh-askpass" 181326938Sdim#endif /* ASKPASS_PROGRAM */ 182326938Sdim