11ec0d754SDag-Erling Smørgrav /* $OpenBSD: pathnames.h,v 1.14 2004/01/30 09:48:57 markus Exp $ */ 21e8db6e2SBrian Feldman 31e8db6e2SBrian Feldman /* 41e8db6e2SBrian Feldman * Author: Tatu Ylonen <ylo@cs.hut.fi> 51e8db6e2SBrian Feldman * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 61e8db6e2SBrian Feldman * All rights reserved 71e8db6e2SBrian Feldman * 81e8db6e2SBrian Feldman * As far as I am concerned, the code I have written for this software 91e8db6e2SBrian Feldman * can be used freely for any purpose. Any derived versions of this 101e8db6e2SBrian Feldman * software must be clearly marked as such, and if the derived work is 111e8db6e2SBrian Feldman * incompatible with the protocol description in the RFC file, it must be 121e8db6e2SBrian Feldman * called by a name other than "ssh" or "Secure Shell". 131e8db6e2SBrian Feldman */ 141e8db6e2SBrian Feldman 15af12a3e7SDag-Erling Smørgrav #define ETCDIR "/etc" 16989dd127SDag-Erling Smørgrav 17989dd127SDag-Erling Smørgrav #ifndef SSHDIR 18af12a3e7SDag-Erling Smørgrav #define SSHDIR ETCDIR "/ssh" 19989dd127SDag-Erling Smørgrav #endif 20989dd127SDag-Erling Smørgrav 21989dd127SDag-Erling Smørgrav #ifndef _PATH_SSH_PIDDIR 221e8db6e2SBrian Feldman #define _PATH_SSH_PIDDIR "/var/run" 23989dd127SDag-Erling Smørgrav #endif 241e8db6e2SBrian Feldman 251e8db6e2SBrian Feldman /* 261e8db6e2SBrian Feldman * System-wide file containing host keys of known hosts. This file should be 271e8db6e2SBrian Feldman * world-readable. 281e8db6e2SBrian Feldman */ 29af12a3e7SDag-Erling Smørgrav #define _PATH_SSH_SYSTEM_HOSTFILE SSHDIR "/ssh_known_hosts" 30af12a3e7SDag-Erling Smørgrav /* backward compat for protocol 2 */ 31af12a3e7SDag-Erling Smørgrav #define _PATH_SSH_SYSTEM_HOSTFILE2 SSHDIR "/ssh_known_hosts2" 321e8db6e2SBrian Feldman 331e8db6e2SBrian Feldman /* 341e8db6e2SBrian Feldman * Of these, ssh_host_key must be readable only by root, whereas ssh_config 351e8db6e2SBrian Feldman * should be world-readable. 361e8db6e2SBrian Feldman */ 37af12a3e7SDag-Erling Smørgrav #define _PATH_SERVER_CONFIG_FILE SSHDIR "/sshd_config" 38af12a3e7SDag-Erling Smørgrav #define _PATH_HOST_CONFIG_FILE SSHDIR "/ssh_config" 39af12a3e7SDag-Erling Smørgrav #define _PATH_HOST_KEY_FILE SSHDIR "/ssh_host_key" 40af12a3e7SDag-Erling Smørgrav #define _PATH_HOST_DSA_KEY_FILE SSHDIR "/ssh_host_dsa_key" 41af12a3e7SDag-Erling Smørgrav #define _PATH_HOST_RSA_KEY_FILE SSHDIR "/ssh_host_rsa_key" 42af12a3e7SDag-Erling Smørgrav #define _PATH_DH_MODULI SSHDIR "/moduli" 43af12a3e7SDag-Erling Smørgrav /* Backwards compatibility */ 44af12a3e7SDag-Erling Smørgrav #define _PATH_DH_PRIMES SSHDIR "/primes" 451e8db6e2SBrian Feldman 46989dd127SDag-Erling Smørgrav #ifndef _PATH_SSH_PROGRAM 471e8db6e2SBrian Feldman #define _PATH_SSH_PROGRAM "/usr/bin/ssh" 48989dd127SDag-Erling Smørgrav #endif 491e8db6e2SBrian Feldman 501e8db6e2SBrian Feldman /* 511e8db6e2SBrian Feldman * The process id of the daemon listening for connections is saved here to 521e8db6e2SBrian Feldman * make it easier to kill the correct daemon when necessary. 531e8db6e2SBrian Feldman */ 541e8db6e2SBrian Feldman #define _PATH_SSH_DAEMON_PID_FILE _PATH_SSH_PIDDIR "/sshd.pid" 551e8db6e2SBrian Feldman 561e8db6e2SBrian Feldman /* 571e8db6e2SBrian Feldman * The directory in user\'s home directory in which the files reside. The 581e8db6e2SBrian Feldman * directory should be world-readable (though not all files are). 591e8db6e2SBrian Feldman */ 601e8db6e2SBrian Feldman #define _PATH_SSH_USER_DIR ".ssh" 611e8db6e2SBrian Feldman 621e8db6e2SBrian Feldman /* 631e8db6e2SBrian Feldman * Per-user file containing host keys of known hosts. This file need not be 641e8db6e2SBrian Feldman * readable by anyone except the user him/herself, though this does not 651e8db6e2SBrian Feldman * contain anything particularly secret. 661e8db6e2SBrian Feldman */ 671e8db6e2SBrian Feldman #define _PATH_SSH_USER_HOSTFILE "~/.ssh/known_hosts" 68af12a3e7SDag-Erling Smørgrav /* backward compat for protocol 2 */ 691e8db6e2SBrian Feldman #define _PATH_SSH_USER_HOSTFILE2 "~/.ssh/known_hosts2" 701e8db6e2SBrian Feldman 711e8db6e2SBrian Feldman /* 721e8db6e2SBrian Feldman * Name of the default file containing client-side authentication key. This 731e8db6e2SBrian Feldman * file should only be readable by the user him/herself. 741e8db6e2SBrian Feldman */ 751e8db6e2SBrian Feldman #define _PATH_SSH_CLIENT_IDENTITY ".ssh/identity" 761e8db6e2SBrian Feldman #define _PATH_SSH_CLIENT_ID_DSA ".ssh/id_dsa" 771e8db6e2SBrian Feldman #define _PATH_SSH_CLIENT_ID_RSA ".ssh/id_rsa" 781e8db6e2SBrian Feldman 791e8db6e2SBrian Feldman /* 801e8db6e2SBrian Feldman * Configuration file in user\'s home directory. This file need not be 811e8db6e2SBrian Feldman * readable by anyone but the user him/herself, but does not contain anything 821e8db6e2SBrian Feldman * particularly secret. If the user\'s home directory resides on an NFS 831e8db6e2SBrian Feldman * volume where root is mapped to nobody, this may need to be world-readable. 841e8db6e2SBrian Feldman */ 851e8db6e2SBrian Feldman #define _PATH_SSH_USER_CONFFILE ".ssh/config" 861e8db6e2SBrian Feldman 871e8db6e2SBrian Feldman /* 881e8db6e2SBrian Feldman * File containing a list of those rsa keys that permit logging in as this 891e8db6e2SBrian Feldman * user. This file need not be readable by anyone but the user him/herself, 901e8db6e2SBrian Feldman * but does not contain anything particularly secret. If the user\'s home 911e8db6e2SBrian Feldman * directory resides on an NFS volume where root is mapped to nobody, this 921e8db6e2SBrian Feldman * may need to be world-readable. (This file is read by the daemon which is 931e8db6e2SBrian Feldman * running as root.) 941e8db6e2SBrian Feldman */ 951e8db6e2SBrian Feldman #define _PATH_SSH_USER_PERMITTED_KEYS ".ssh/authorized_keys" 96af12a3e7SDag-Erling Smørgrav 97af12a3e7SDag-Erling Smørgrav /* backward compat for protocol v2 */ 981e8db6e2SBrian Feldman #define _PATH_SSH_USER_PERMITTED_KEYS2 ".ssh/authorized_keys2" 991e8db6e2SBrian Feldman 1001e8db6e2SBrian Feldman /* 1011e8db6e2SBrian Feldman * Per-user and system-wide ssh "rc" files. These files are executed with 1021e8db6e2SBrian Feldman * /bin/sh before starting the shell or command if they exist. They will be 1031e8db6e2SBrian Feldman * passed "proto cookie" as arguments if X11 forwarding with spoofing is in 1041e8db6e2SBrian Feldman * use. xauth will be run if neither of these exists. 1051e8db6e2SBrian Feldman */ 1061e8db6e2SBrian Feldman #define _PATH_SSH_USER_RC ".ssh/rc" 107af12a3e7SDag-Erling Smørgrav #define _PATH_SSH_SYSTEM_RC SSHDIR "/sshrc" 1081e8db6e2SBrian Feldman 1091e8db6e2SBrian Feldman /* 1101e8db6e2SBrian Feldman * Ssh-only version of /etc/hosts.equiv. Additionally, the daemon may use 1111e8db6e2SBrian Feldman * ~/.rhosts and /etc/hosts.equiv if rhosts authentication is enabled. 1121e8db6e2SBrian Feldman */ 113af12a3e7SDag-Erling Smørgrav #define _PATH_SSH_HOSTS_EQUIV SSHDIR "/shosts.equiv" 1141e8db6e2SBrian Feldman #define _PATH_RHOSTS_EQUIV "/etc/hosts.equiv" 1151e8db6e2SBrian Feldman 1161e8db6e2SBrian Feldman /* 1171e8db6e2SBrian Feldman * Default location of askpass 1181e8db6e2SBrian Feldman */ 119989dd127SDag-Erling Smørgrav #ifndef _PATH_SSH_ASKPASS_DEFAULT 1201e8db6e2SBrian Feldman #define _PATH_SSH_ASKPASS_DEFAULT "/usr/X11R6/bin/ssh-askpass" 121989dd127SDag-Erling Smørgrav #endif 1221e8db6e2SBrian Feldman 12380628bacSDag-Erling Smørgrav /* Location of ssh-keysign for hostbased authentication */ 124989dd127SDag-Erling Smørgrav #ifndef _PATH_SSH_KEY_SIGN 12580628bacSDag-Erling Smørgrav #define _PATH_SSH_KEY_SIGN "/usr/libexec/ssh-keysign" 126989dd127SDag-Erling Smørgrav #endif 12780628bacSDag-Erling Smørgrav 128af12a3e7SDag-Erling Smørgrav /* xauth for X11 forwarding */ 129989dd127SDag-Erling Smørgrav #ifndef _PATH_XAUTH 130af12a3e7SDag-Erling Smørgrav #define _PATH_XAUTH "/usr/X11R6/bin/xauth" 131989dd127SDag-Erling Smørgrav #endif 132af12a3e7SDag-Erling Smørgrav 133af12a3e7SDag-Erling Smørgrav /* UNIX domain socket for X11 server; displaynum will replace %u */ 134989dd127SDag-Erling Smørgrav #ifndef _PATH_UNIX_X 135af12a3e7SDag-Erling Smørgrav #define _PATH_UNIX_X "/tmp/.X11-unix/X%u" 136989dd127SDag-Erling Smørgrav #endif 137989dd127SDag-Erling Smørgrav 138989dd127SDag-Erling Smørgrav /* for scp */ 139989dd127SDag-Erling Smørgrav #ifndef _PATH_CP 140989dd127SDag-Erling Smørgrav #define _PATH_CP "cp" 141989dd127SDag-Erling Smørgrav #endif 142af12a3e7SDag-Erling Smørgrav 1431e8db6e2SBrian Feldman /* for sftp */ 144989dd127SDag-Erling Smørgrav #ifndef _PATH_SFTP_SERVER 1451e8db6e2SBrian Feldman #define _PATH_SFTP_SERVER "/usr/libexec/sftp-server" 146989dd127SDag-Erling Smørgrav #endif 14780628bacSDag-Erling Smørgrav 14880628bacSDag-Erling Smørgrav /* chroot directory for unprivileged user when UsePrivilegeSeparation=yes */ 149989dd127SDag-Erling Smørgrav #ifndef _PATH_PRIVSEP_CHROOT_DIR 15080628bacSDag-Erling Smørgrav #define _PATH_PRIVSEP_CHROOT_DIR "/var/empty" 151989dd127SDag-Erling Smørgrav #endif 152989dd127SDag-Erling Smørgrav 1531ec0d754SDag-Erling Smørgrav /* for passwd change */ 1541ec0d754SDag-Erling Smørgrav #ifndef _PATH_PASSWD_PROG 1551ec0d754SDag-Erling Smørgrav #define _PATH_PASSWD_PROG "/usr/bin/passwd" 1561ec0d754SDag-Erling Smørgrav #endif 1571ec0d754SDag-Erling Smørgrav 158989dd127SDag-Erling Smørgrav #ifndef _PATH_LS 159989dd127SDag-Erling Smørgrav #define _PATH_LS "ls" 160989dd127SDag-Erling Smørgrav #endif 161989dd127SDag-Erling Smørgrav 162989dd127SDag-Erling Smørgrav /* path to login program */ 163989dd127SDag-Erling Smørgrav #ifndef LOGIN_PROGRAM 164989dd127SDag-Erling Smørgrav # ifdef LOGIN_PROGRAM_FALLBACK 165989dd127SDag-Erling Smørgrav # define LOGIN_PROGRAM LOGIN_PROGRAM_FALLBACK 166989dd127SDag-Erling Smørgrav # else 167989dd127SDag-Erling Smørgrav # define LOGIN_PROGRAM "/usr/bin/login" 168989dd127SDag-Erling Smørgrav # endif 169989dd127SDag-Erling Smørgrav #endif /* LOGIN_PROGRAM */ 170989dd127SDag-Erling Smørgrav 171989dd127SDag-Erling Smørgrav /* Askpass program define */ 172989dd127SDag-Erling Smørgrav #ifndef ASKPASS_PROGRAM 173989dd127SDag-Erling Smørgrav #define ASKPASS_PROGRAM "/usr/lib/ssh/ssh-askpass" 174989dd127SDag-Erling Smørgrav #endif /* ASKPASS_PROGRAM */ 175