1 /* $OpenBSD: pathnames.h,v 1.15 2004/07/11 17:48:47 deraadt Exp $ */
4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
5 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * As far as I am concerned, the code I have written for this software
9 * can be used freely for any purpose. Any derived versions of this
10 * software must be clearly marked as such, and if the derived work is
11 * incompatible with the protocol description in the RFC file, it must be
12 * called by a name other than "ssh" or "Secure Shell".
16 * Some of these pathnames are generated at run-time to meet GPT binary
17 * relocatability requirements. They are initialized by init_pathnames()
20 void init_pathnames();
23 * System-wide file containing host keys of known hosts. This file should be
26 extern char *_PATH_SSH_SYSTEM_HOSTFILE;
27 /* backward compat for protocol 2 */
28 extern char *_PATH_SSH_SYSTEM_HOSTFILE2;
31 * Of these, ssh_host_key must be readable only by root, whereas ssh_config
32 * should be world-readable.
34 extern char *_PATH_SERVER_CONFIG_FILE;
35 extern char *_PATH_HOST_CONFIG_FILE;
36 extern char *_PATH_HOST_KEY_FILE;
37 extern char *_PATH_HOST_DSA_KEY_FILE;
38 extern char *_PATH_HOST_RSA_KEY_FILE;
39 extern char *_PATH_DH_MODULI;
40 /* Backwards compatibility */
41 extern char *_PATH_DH_PRIMES;
43 extern char *_PATH_SSH_PROGRAM;
46 * The process id of the daemon listening for connections is saved here to
47 * make it easier to kill the correct daemon when necessary.
49 extern char *_PATH_SSH_DAEMON_PID_FILE;
52 * The directory in user\'s home directory in which the files reside. The
53 * directory should be world-readable (though not all files are).
55 #define _PATH_SSH_USER_DIR ".ssh"
58 * Per-user file containing host keys of known hosts. This file need not be
59 * readable by anyone except the user him/herself, though this does not
60 * contain anything particularly secret.
62 #define _PATH_SSH_USER_HOSTFILE "~/.ssh/known_hosts"
63 /* backward compat for protocol 2 */
64 #define _PATH_SSH_USER_HOSTFILE2 "~/.ssh/known_hosts2"
67 * Name of the default file containing client-side authentication key. This
68 * file should only be readable by the user him/herself.
70 #define _PATH_SSH_CLIENT_IDENTITY ".ssh/identity"
71 #define _PATH_SSH_CLIENT_ID_DSA ".ssh/id_dsa"
72 #define _PATH_SSH_CLIENT_ID_RSA ".ssh/id_rsa"
75 * Configuration file in user\'s home directory. This file need not be
76 * readable by anyone but the user him/herself, but does not contain anything
77 * particularly secret. If the user\'s home directory resides on an NFS
78 * volume where root is mapped to nobody, this may need to be world-readable.
80 #define _PATH_SSH_USER_CONFFILE ".ssh/config"
83 * File containing a list of those rsa keys that permit logging in as this
84 * user. This file need not be readable by anyone but the user him/herself,
85 * but does not contain anything particularly secret. If the user\'s home
86 * directory resides on an NFS volume where root is mapped to nobody, this
87 * may need to be world-readable. (This file is read by the daemon which is
90 #define _PATH_SSH_USER_PERMITTED_KEYS ".ssh/authorized_keys"
92 /* backward compat for protocol v2 */
93 #define _PATH_SSH_USER_PERMITTED_KEYS2 ".ssh/authorized_keys2"
96 * Per-user and system-wide ssh "rc" files. These files are executed with
97 * /bin/sh before starting the shell or command if they exist. They will be
98 * passed "proto cookie" as arguments if X11 forwarding with spoofing is in
99 * use. xauth will be run if neither of these exists.
101 #define _PATH_SSH_USER_RC ".ssh/rc"
102 extern char *_PATH_SSH_SYSTEM_RC;
105 * Ssh-only version of /etc/hosts.equiv. Additionally, the daemon may use
106 * ~/.rhosts and /etc/hosts.equiv if rhosts authentication is enabled.
108 extern char *_PATH_SSH_HOSTS_EQUIV;
109 #define _PATH_RHOSTS_EQUIV "/etc/hosts.equiv"
112 * Default location of askpass
114 #ifndef _PATH_SSH_ASKPASS_DEFAULT
115 #define _PATH_SSH_ASKPASS_DEFAULT "/usr/X11R6/bin/ssh-askpass"
118 /* Location of ssh-keysign for hostbased authentication */
119 extern char *_PATH_SSH_KEY_SIGN;
121 /* xauth for X11 forwarding */
123 #define _PATH_XAUTH "/usr/X11R6/bin/xauth"
126 /* UNIX domain socket for X11 server; displaynum will replace %u */
128 #define _PATH_UNIX_X "/tmp/.X11-unix/X%u"
133 #define _PATH_CP "cp"
137 extern char *_PATH_SFTP_SERVER;
139 /* chroot directory for unprivileged user when UsePrivilegeSeparation=yes */
140 #ifndef _PATH_PRIVSEP_CHROOT_DIR
141 #define _PATH_PRIVSEP_CHROOT_DIR "/var/empty"
144 /* for passwd change */
145 #ifndef _PATH_PASSWD_PROG
146 #define _PATH_PASSWD_PROG "/usr/bin/passwd"
150 #define _PATH_LS "ls"
153 /* path to login program */
154 #ifndef LOGIN_PROGRAM
155 # ifdef LOGIN_PROGRAM_FALLBACK
156 # define LOGIN_PROGRAM LOGIN_PROGRAM_FALLBACK
158 # define LOGIN_PROGRAM "/usr/bin/login"
160 #endif /* LOGIN_PROGRAM */
162 /* Askpass program define */
163 #ifndef ASKPASS_PROGRAM
164 #define ASKPASS_PROGRAM "/usr/lib/ssh/ssh-askpass"
165 #endif /* ASKPASS_PROGRAM */
167 /* Path to rand helper */
168 extern char *SSH_RAND_HELPER;
170 /* Default user path that includes location of scp. */
171 extern char *_PATH_STDPATH_WITH_SCP;