]>
Commit | Line | Data |
---|---|---|
2e437378 | 1 | /* $OpenBSD: pathnames.h,v 1.16 2006/03/25 22:22:43 djm Exp $ */ |
3c0ef626 | 2 | |
3 | /* | |
4 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | |
5 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | |
6 | * All rights reserved | |
7 | * | |
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". | |
13 | */ | |
14 | ||
ae43c103 | 15 | /* |
16 | * Some of these pathnames are generated at run-time to meet GPT binary | |
17 | * relocatability requirements. They are initialized by init_pathnames() | |
18 | * in pathnames.c. | |
19 | */ | |
20 | void init_pathnames(); | |
3c0ef626 | 21 | |
3c0ef626 | 22 | /* |
23 | * System-wide file containing host keys of known hosts. This file should be | |
24 | * world-readable. | |
25 | */ | |
ae43c103 | 26 | extern char *_PATH_SSH_SYSTEM_HOSTFILE; |
3c0ef626 | 27 | /* backward compat for protocol 2 */ |
ae43c103 | 28 | extern char *_PATH_SSH_SYSTEM_HOSTFILE2; |
3c0ef626 | 29 | |
30 | /* | |
31 | * Of these, ssh_host_key must be readable only by root, whereas ssh_config | |
32 | * should be world-readable. | |
33 | */ | |
ae43c103 | 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; | |
3c0ef626 | 40 | /* Backwards compatibility */ |
ae43c103 | 41 | extern char *_PATH_DH_PRIMES; |
3c0ef626 | 42 | |
ae43c103 | 43 | extern char *_PATH_SSH_PROGRAM; |
3c0ef626 | 44 | |
45 | /* | |
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. | |
48 | */ | |
d7766c89 | 49 | extern char *_PATH_SSH_DAEMON_PID_FILE; |
3c0ef626 | 50 | |
51 | /* | |
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). | |
54 | */ | |
55 | #define _PATH_SSH_USER_DIR ".ssh" | |
56 | ||
57 | /* | |
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. | |
61 | */ | |
62 | #define _PATH_SSH_USER_HOSTFILE "~/.ssh/known_hosts" | |
63 | /* backward compat for protocol 2 */ | |
64 | #define _PATH_SSH_USER_HOSTFILE2 "~/.ssh/known_hosts2" | |
65 | ||
66 | /* | |
67 | * Name of the default file containing client-side authentication key. This | |
68 | * file should only be readable by the user him/herself. | |
69 | */ | |
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" | |
73 | ||
74 | /* | |
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. | |
79 | */ | |
80 | #define _PATH_SSH_USER_CONFFILE ".ssh/config" | |
81 | ||
82 | /* | |
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 | |
88 | * running as root.) | |
89 | */ | |
90 | #define _PATH_SSH_USER_PERMITTED_KEYS ".ssh/authorized_keys" | |
91 | ||
92 | /* backward compat for protocol v2 */ | |
93 | #define _PATH_SSH_USER_PERMITTED_KEYS2 ".ssh/authorized_keys2" | |
94 | ||
95 | /* | |
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. | |
100 | */ | |
101 | #define _PATH_SSH_USER_RC ".ssh/rc" | |
ae43c103 | 102 | extern char *_PATH_SSH_SYSTEM_RC; |
3c0ef626 | 103 | |
104 | /* | |
105 | * Ssh-only version of /etc/hosts.equiv. Additionally, the daemon may use | |
106 | * ~/.rhosts and /etc/hosts.equiv if rhosts authentication is enabled. | |
107 | */ | |
ae43c103 | 108 | extern char *_PATH_SSH_HOSTS_EQUIV; |
3c0ef626 | 109 | #define _PATH_RHOSTS_EQUIV "/etc/hosts.equiv" |
110 | ||
111 | /* | |
112 | * Default location of askpass | |
113 | */ | |
114 | #ifndef _PATH_SSH_ASKPASS_DEFAULT | |
115 | #define _PATH_SSH_ASKPASS_DEFAULT "/usr/X11R6/bin/ssh-askpass" | |
116 | #endif | |
117 | ||
ff2d7a98 | 118 | /* Location of ssh-keysign for hostbased authentication */ |
b2393c9a | 119 | extern char *_PATH_SSH_KEY_SIGN; |
ff2d7a98 | 120 | |
3c0ef626 | 121 | /* xauth for X11 forwarding */ |
122 | #ifndef _PATH_XAUTH | |
123 | #define _PATH_XAUTH "/usr/X11R6/bin/xauth" | |
124 | #endif | |
125 | ||
e9a17296 | 126 | /* UNIX domain socket for X11 server; displaynum will replace %u */ |
127 | #ifndef _PATH_UNIX_X | |
128 | #define _PATH_UNIX_X "/tmp/.X11-unix/X%u" | |
129 | #endif | |
130 | ||
3c0ef626 | 131 | /* for scp */ |
132 | #ifndef _PATH_CP | |
133 | #define _PATH_CP "cp" | |
134 | #endif | |
135 | ||
136 | /* for sftp */ | |
ae43c103 | 137 | extern char *_PATH_SFTP_SERVER; |
138 | ||
2980ea68 | 139 | /* chroot directory for unprivileged user when UsePrivilegeSeparation=yes */ |
140 | #ifndef _PATH_PRIVSEP_CHROOT_DIR | |
141 | #define _PATH_PRIVSEP_CHROOT_DIR "/var/empty" | |
142 | #endif | |
143 | ||
416fd2a8 | 144 | /* for passwd change */ |
145 | #ifndef _PATH_PASSWD_PROG | |
146 | #define _PATH_PASSWD_PROG "/usr/bin/passwd" | |
147 | #endif | |
148 | ||
3c0ef626 | 149 | #ifndef _PATH_LS |
150 | #define _PATH_LS "ls" | |
151 | #endif | |
152 | ||
153 | /* path to login program */ | |
154 | #ifndef LOGIN_PROGRAM | |
155 | # ifdef LOGIN_PROGRAM_FALLBACK | |
156 | # define LOGIN_PROGRAM LOGIN_PROGRAM_FALLBACK | |
157 | # else | |
158 | # define LOGIN_PROGRAM "/usr/bin/login" | |
159 | # endif | |
160 | #endif /* LOGIN_PROGRAM */ | |
161 | ||
162 | /* Askpass program define */ | |
163 | #ifndef ASKPASS_PROGRAM | |
164 | #define ASKPASS_PROGRAM "/usr/lib/ssh/ssh-askpass" | |
165 | #endif /* ASKPASS_PROGRAM */ | |
7c05f953 | 166 | |
167 | /* Path to rand helper */ | |
168 | extern char *SSH_RAND_HELPER; | |
e4e8cd53 | 169 | |
170 | /* Default user path that includes location of scp. */ | |
171 | extern char *_PATH_STDPATH_WITH_SCP; |