1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 3*0Sstevel@tonic-gate * Use is subject to license terms. 4*0Sstevel@tonic-gate */ 5*0Sstevel@tonic-gate /* $OpenBSD: pathnames.h,v 1.13 2002/05/23 19:24:30 markus Exp $ */ 6*0Sstevel@tonic-gate 7*0Sstevel@tonic-gate #ifndef _PATHNAMES_H 8*0Sstevel@tonic-gate #define _PATHNAMES_H 9*0Sstevel@tonic-gate 10*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 11*0Sstevel@tonic-gate 12*0Sstevel@tonic-gate #ifdef __cplusplus 13*0Sstevel@tonic-gate extern "C" { 14*0Sstevel@tonic-gate #endif 15*0Sstevel@tonic-gate 16*0Sstevel@tonic-gate 17*0Sstevel@tonic-gate /* 18*0Sstevel@tonic-gate * Author: Tatu Ylonen <ylo@cs.hut.fi> 19*0Sstevel@tonic-gate * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 20*0Sstevel@tonic-gate * All rights reserved 21*0Sstevel@tonic-gate * 22*0Sstevel@tonic-gate * As far as I am concerned, the code I have written for this software 23*0Sstevel@tonic-gate * can be used freely for any purpose. Any derived versions of this 24*0Sstevel@tonic-gate * software must be clearly marked as such, and if the derived work is 25*0Sstevel@tonic-gate * incompatible with the protocol description in the RFC file, it must be 26*0Sstevel@tonic-gate * called by a name other than "ssh" or "Secure Shell". 27*0Sstevel@tonic-gate */ 28*0Sstevel@tonic-gate 29*0Sstevel@tonic-gate #define ETCDIR "/etc" 30*0Sstevel@tonic-gate 31*0Sstevel@tonic-gate #ifndef SSHDIR 32*0Sstevel@tonic-gate #define SSHDIR ETCDIR "/ssh" 33*0Sstevel@tonic-gate #endif 34*0Sstevel@tonic-gate 35*0Sstevel@tonic-gate #ifndef _PATH_SSH_PIDDIR 36*0Sstevel@tonic-gate #define _PATH_SSH_PIDDIR "/var/run" 37*0Sstevel@tonic-gate #endif 38*0Sstevel@tonic-gate 39*0Sstevel@tonic-gate /* 40*0Sstevel@tonic-gate * System-wide file containing host keys of known hosts. This file should be 41*0Sstevel@tonic-gate * world-readable. 42*0Sstevel@tonic-gate */ 43*0Sstevel@tonic-gate #define _PATH_SSH_SYSTEM_HOSTFILE SSHDIR "/ssh_known_hosts" 44*0Sstevel@tonic-gate /* backward compat for protocol 2 */ 45*0Sstevel@tonic-gate #define _PATH_SSH_SYSTEM_HOSTFILE2 SSHDIR "/ssh_known_hosts2" 46*0Sstevel@tonic-gate 47*0Sstevel@tonic-gate /* 48*0Sstevel@tonic-gate * Of these, ssh_host_key must be readable only by root, whereas ssh_config 49*0Sstevel@tonic-gate * should be world-readable. 50*0Sstevel@tonic-gate */ 51*0Sstevel@tonic-gate #define _PATH_SERVER_CONFIG_FILE SSHDIR "/sshd_config" 52*0Sstevel@tonic-gate #define _PATH_HOST_CONFIG_FILE SSHDIR "/ssh_config" 53*0Sstevel@tonic-gate #define _PATH_HOST_KEY_FILE SSHDIR "/ssh_host_key" 54*0Sstevel@tonic-gate #define _PATH_HOST_DSA_KEY_FILE SSHDIR "/ssh_host_dsa_key" 55*0Sstevel@tonic-gate #define _PATH_HOST_RSA_KEY_FILE SSHDIR "/ssh_host_rsa_key" 56*0Sstevel@tonic-gate #define _PATH_DH_MODULI SSHDIR "/moduli" 57*0Sstevel@tonic-gate /* Backwards compatibility */ 58*0Sstevel@tonic-gate #define _PATH_DH_PRIMES SSHDIR "/primes" 59*0Sstevel@tonic-gate 60*0Sstevel@tonic-gate #ifndef _PATH_SSH_PROGRAM 61*0Sstevel@tonic-gate #define _PATH_SSH_PROGRAM "/usr/bin/ssh" 62*0Sstevel@tonic-gate #endif 63*0Sstevel@tonic-gate 64*0Sstevel@tonic-gate /* 65*0Sstevel@tonic-gate * The process id of the daemon listening for connections is saved here to 66*0Sstevel@tonic-gate * make it easier to kill the correct daemon when necessary. 67*0Sstevel@tonic-gate */ 68*0Sstevel@tonic-gate #define _PATH_SSH_DAEMON_PID_FILE _PATH_SSH_PIDDIR "/sshd.pid" 69*0Sstevel@tonic-gate 70*0Sstevel@tonic-gate /* 71*0Sstevel@tonic-gate * The directory in user\'s home directory in which the files reside. The 72*0Sstevel@tonic-gate * directory should be world-readable (though not all files are). 73*0Sstevel@tonic-gate */ 74*0Sstevel@tonic-gate #define _PATH_SSH_USER_DIR ".ssh" 75*0Sstevel@tonic-gate 76*0Sstevel@tonic-gate /* 77*0Sstevel@tonic-gate * Per-user file containing host keys of known hosts. This file need not be 78*0Sstevel@tonic-gate * readable by anyone except the user him/herself, though this does not 79*0Sstevel@tonic-gate * contain anything particularly secret. 80*0Sstevel@tonic-gate */ 81*0Sstevel@tonic-gate #define _PATH_SSH_USER_HOSTFILE "~/.ssh/known_hosts" 82*0Sstevel@tonic-gate /* backward compat for protocol 2 */ 83*0Sstevel@tonic-gate #define _PATH_SSH_USER_HOSTFILE2 "~/.ssh/known_hosts2" 84*0Sstevel@tonic-gate 85*0Sstevel@tonic-gate /* 86*0Sstevel@tonic-gate * Name of the default file containing client-side authentication key. This 87*0Sstevel@tonic-gate * file should only be readable by the user him/herself. 88*0Sstevel@tonic-gate */ 89*0Sstevel@tonic-gate #define _PATH_SSH_CLIENT_IDENTITY ".ssh/identity" 90*0Sstevel@tonic-gate #define _PATH_SSH_CLIENT_ID_DSA ".ssh/id_dsa" 91*0Sstevel@tonic-gate #define _PATH_SSH_CLIENT_ID_RSA ".ssh/id_rsa" 92*0Sstevel@tonic-gate 93*0Sstevel@tonic-gate /* 94*0Sstevel@tonic-gate * Configuration file in user\'s home directory. This file need not be 95*0Sstevel@tonic-gate * readable by anyone but the user him/herself, but does not contain anything 96*0Sstevel@tonic-gate * particularly secret. If the user\'s home directory resides on an NFS 97*0Sstevel@tonic-gate * volume where root is mapped to nobody, this may need to be world-readable. 98*0Sstevel@tonic-gate */ 99*0Sstevel@tonic-gate #define _PATH_SSH_USER_CONFFILE ".ssh/config" 100*0Sstevel@tonic-gate 101*0Sstevel@tonic-gate /* 102*0Sstevel@tonic-gate * File containing a list of those rsa keys that permit logging in as this 103*0Sstevel@tonic-gate * user. This file need not be readable by anyone but the user him/herself, 104*0Sstevel@tonic-gate * but does not contain anything particularly secret. If the user\'s home 105*0Sstevel@tonic-gate * directory resides on an NFS volume where root is mapped to nobody, this 106*0Sstevel@tonic-gate * may need to be world-readable. (This file is read by the daemon which is 107*0Sstevel@tonic-gate * running as root.) 108*0Sstevel@tonic-gate */ 109*0Sstevel@tonic-gate #define _PATH_SSH_USER_PERMITTED_KEYS ".ssh/authorized_keys" 110*0Sstevel@tonic-gate 111*0Sstevel@tonic-gate /* backward compat for protocol v2 */ 112*0Sstevel@tonic-gate #define _PATH_SSH_USER_PERMITTED_KEYS2 ".ssh/authorized_keys2" 113*0Sstevel@tonic-gate 114*0Sstevel@tonic-gate /* 115*0Sstevel@tonic-gate * Per-user and system-wide ssh "rc" files. These files are executed with 116*0Sstevel@tonic-gate * /bin/sh before starting the shell or command if they exist. They will be 117*0Sstevel@tonic-gate * passed "proto cookie" as arguments if X11 forwarding with spoofing is in 118*0Sstevel@tonic-gate * use. xauth will be run if neither of these exists. 119*0Sstevel@tonic-gate */ 120*0Sstevel@tonic-gate #define _PATH_SSH_USER_RC ".ssh/rc" 121*0Sstevel@tonic-gate #define _PATH_SSH_SYSTEM_RC SSHDIR "/sshrc" 122*0Sstevel@tonic-gate 123*0Sstevel@tonic-gate /* 124*0Sstevel@tonic-gate * Ssh-only version of /etc/hosts.equiv. Additionally, the daemon may use 125*0Sstevel@tonic-gate * ~/.rhosts and /etc/hosts.equiv if rhosts authentication is enabled. 126*0Sstevel@tonic-gate */ 127*0Sstevel@tonic-gate #define _PATH_SSH_HOSTS_EQUIV SSHDIR "/shosts.equiv" 128*0Sstevel@tonic-gate #define _PATH_RHOSTS_EQUIV "/etc/hosts.equiv" 129*0Sstevel@tonic-gate 130*0Sstevel@tonic-gate /* 131*0Sstevel@tonic-gate * /etc/default/login 132*0Sstevel@tonic-gate */ 133*0Sstevel@tonic-gate #define _PATH_DEFAULT_LOGIN "/etc/default/login" 134*0Sstevel@tonic-gate 135*0Sstevel@tonic-gate /* 136*0Sstevel@tonic-gate * Default location of askpass 137*0Sstevel@tonic-gate */ 138*0Sstevel@tonic-gate #ifndef _PATH_SSH_ASKPASS_DEFAULT 139*0Sstevel@tonic-gate #define _PATH_SSH_ASKPASS_DEFAULT "/usr/lib/ssh/ssh-askpass" 140*0Sstevel@tonic-gate #endif 141*0Sstevel@tonic-gate 142*0Sstevel@tonic-gate /* Location of ssh-keysign for hostbased authentication */ 143*0Sstevel@tonic-gate #ifndef _PATH_SSH_KEY_SIGN 144*0Sstevel@tonic-gate #define _PATH_SSH_KEY_SIGN "/usr/lib/ssh/ssh-keysign" 145*0Sstevel@tonic-gate #endif 146*0Sstevel@tonic-gate 147*0Sstevel@tonic-gate /* xauth for X11 forwarding */ 148*0Sstevel@tonic-gate #ifndef _PATH_XAUTH 149*0Sstevel@tonic-gate #define _PATH_XAUTH "/usr/openwin/bin/xauth" 150*0Sstevel@tonic-gate #endif 151*0Sstevel@tonic-gate 152*0Sstevel@tonic-gate /* UNIX domain socket for X11 server; displaynum will replace %u */ 153*0Sstevel@tonic-gate #ifndef _PATH_UNIX_X 154*0Sstevel@tonic-gate #define _PATH_UNIX_X "/tmp/.X11-unix/X%u" 155*0Sstevel@tonic-gate #endif 156*0Sstevel@tonic-gate 157*0Sstevel@tonic-gate /* for scp */ 158*0Sstevel@tonic-gate #ifndef _PATH_CP 159*0Sstevel@tonic-gate #define _PATH_CP "cp" 160*0Sstevel@tonic-gate #endif 161*0Sstevel@tonic-gate 162*0Sstevel@tonic-gate /* for sftp */ 163*0Sstevel@tonic-gate #ifndef _PATH_SFTP_SERVER 164*0Sstevel@tonic-gate #define _PATH_SFTP_SERVER "/usr/lib/ssh/sftp-server" 165*0Sstevel@tonic-gate #endif 166*0Sstevel@tonic-gate 167*0Sstevel@tonic-gate /* chroot directory for unprivileged user when UsePrivilegeSeparation=yes */ 168*0Sstevel@tonic-gate #ifndef _PATH_PRIVSEP_CHROOT_DIR 169*0Sstevel@tonic-gate #define _PATH_PRIVSEP_CHROOT_DIR "/var/empty" 170*0Sstevel@tonic-gate #endif 171*0Sstevel@tonic-gate 172*0Sstevel@tonic-gate #ifndef _PATH_LS 173*0Sstevel@tonic-gate #define _PATH_LS "ls" 174*0Sstevel@tonic-gate #endif 175*0Sstevel@tonic-gate 176*0Sstevel@tonic-gate /* path to login program */ 177*0Sstevel@tonic-gate #ifndef LOGIN_PROGRAM 178*0Sstevel@tonic-gate # ifdef LOGIN_PROGRAM_FALLBACK 179*0Sstevel@tonic-gate # define LOGIN_PROGRAM LOGIN_PROGRAM_FALLBACK 180*0Sstevel@tonic-gate # else 181*0Sstevel@tonic-gate # define LOGIN_PROGRAM "/usr/bin/login" 182*0Sstevel@tonic-gate # endif 183*0Sstevel@tonic-gate #endif /* LOGIN_PROGRAM */ 184*0Sstevel@tonic-gate 185*0Sstevel@tonic-gate /* Askpass program define */ 186*0Sstevel@tonic-gate #ifndef ASKPASS_PROGRAM 187*0Sstevel@tonic-gate #define ASKPASS_PROGRAM "/usr/lib/ssh/ssh-askpass" 188*0Sstevel@tonic-gate #endif /* ASKPASS_PROGRAM */ 189*0Sstevel@tonic-gate 190*0Sstevel@tonic-gate #ifdef __cplusplus 191*0Sstevel@tonic-gate } 192*0Sstevel@tonic-gate #endif 193*0Sstevel@tonic-gate 194*0Sstevel@tonic-gate #endif /* _PATHNAMES_H */ 195