Grid Community Toolkit  6.2.1567772254 (tag: v6.2.20190906)
pathnames.h
1 /* $OpenBSD: pathnames.h,v 1.25 2016/03/31 05:24:06 dtucker Exp $ */
2 
3 /*
4  * Author: Tatu Ylonen <[email protected]>
5  * Copyright (c) 1995 Tatu Ylonen <[email protected]>, 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 
15 /*
16  * Some of these pathnames are generated at run-time for binary
17  * relocatability. They are initialized by init_pathnames()
18  * in pathnames.c.
19  */
20 void init_pathnames();
21 
22 /*
23  * System-wide file containing host keys of known hosts. This file should be
24  * world-readable.
25  */
26 extern char *_PATH_SSH_SYSTEM_HOSTFILE;
27 /* backward compat for protocol 2 */
28 extern char *_PATH_SSH_SYSTEM_HOSTFILE2;
29 
30 /*
31  * Of these, ssh_host_key must be readable only by root, whereas ssh_config
32  * should be world-readable.
33  */
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_ECDSA_KEY_FILE;
39 extern char *_PATH_HOST_ED25519_KEY_FILE;
40 extern char *_PATH_HOST_RSA_KEY_FILE;
41 extern char *_PATH_DH_MODULI;
42 
43 extern char *_PATH_SSHDIR;
44 extern char *_PATH_SSH_PROGRAM;
45 
46 /*
47  * The process id of the daemon listening for connections is saved here to
48  * make it easier to kill the correct daemon when necessary.
49  */
50 extern char *_PATH_SSH_DAEMON_PID_FILE;
51 
52 /*
53  * The directory in user's home directory in which the files reside. The
54  * directory should be world-readable (though not all files are).
55  */
56 #define _PATH_SSH_USER_DIR ".ssh"
57 
58 /*
59  * Per-user file containing host keys of known hosts. This file need not be
60  * readable by anyone except the user him/herself, though this does not
61  * contain anything particularly secret.
62  */
63 #define _PATH_SSH_USER_HOSTFILE "~/" _PATH_SSH_USER_DIR "/known_hosts"
64 /* backward compat for protocol 2 */
65 #define _PATH_SSH_USER_HOSTFILE2 "~/" _PATH_SSH_USER_DIR "/known_hosts2"
66 
67 /*
68  * Name of the default file containing client-side authentication key. This
69  * file should only be readable by the user him/herself.
70  */
71 #define _PATH_SSH_CLIENT_IDENTITY _PATH_SSH_USER_DIR "/identity"
72 #define _PATH_SSH_CLIENT_ID_DSA _PATH_SSH_USER_DIR "/id_dsa"
73 #define _PATH_SSH_CLIENT_ID_ECDSA _PATH_SSH_USER_DIR "/id_ecdsa"
74 #define _PATH_SSH_CLIENT_ID_RSA _PATH_SSH_USER_DIR "/id_rsa"
75 #define _PATH_SSH_CLIENT_ID_ED25519 _PATH_SSH_USER_DIR "/id_ed25519"
76 
77 /*
78  * Configuration file in user's home directory. This file need not be
79  * readable by anyone but the user him/herself, but does not contain anything
80  * particularly secret. If the user's home directory resides on an NFS
81  * volume where root is mapped to nobody, this may need to be world-readable.
82  */
83 #define _PATH_SSH_USER_CONFFILE _PATH_SSH_USER_DIR "/config"
84 
85 /*
86  * File containing a list of those rsa keys that permit logging in as this
87  * user. This file need not be readable by anyone but the user him/herself,
88  * but does not contain anything particularly secret. If the user's home
89  * directory resides on an NFS volume where root is mapped to nobody, this
90  * may need to be world-readable. (This file is read by the daemon which is
91  * running as root.)
92  */
93 #define _PATH_SSH_USER_PERMITTED_KEYS _PATH_SSH_USER_DIR "/authorized_keys"
94 
95 /* backward compat for protocol v2 */
96 #define _PATH_SSH_USER_PERMITTED_KEYS2 _PATH_SSH_USER_DIR "/authorized_keys2"
97 
98 /*
99  * Per-user and system-wide ssh "rc" files. These files are executed with
100  * /bin/sh before starting the shell or command if they exist. They will be
101  * passed "proto cookie" as arguments if X11 forwarding with spoofing is in
102  * use. xauth will be run if neither of these exists.
103  */
104 #define _PATH_SSH_USER_RC _PATH_SSH_USER_DIR "/rc"
105 extern char *_PATH_SSH_SYSTEM_RC;
106 
107 /*
108  * Ssh-only version of /etc/hosts.equiv. Additionally, the daemon may use
109  * ~/.rhosts and /etc/hosts.equiv if rhosts authentication is enabled.
110  */
111 extern char *_PATH_SSH_HOSTS_EQUIV;
112 #define _PATH_RHOSTS_EQUIV "/etc/hosts.equiv"
113 
114 /*
115  * Default location of askpass
116  */
117 #ifndef _PATH_SSH_ASKPASS_DEFAULT
118 #define _PATH_SSH_ASKPASS_DEFAULT "/usr/X11R6/bin/ssh-askpass"
119 #endif
120 
121 /* Location of ssh-keysign for hostbased authentication */
122 extern char *_PATH_SSH_KEY_SIGN;
123 
124 /* Location of ssh-pkcs11-helper to support keys in tokens */
125 #ifndef _PATH_SSH_PKCS11_HELPER
126 #define _PATH_SSH_PKCS11_HELPER "/usr/libexec/ssh-pkcs11-helper"
127 #endif
128 
129 /* xauth for X11 forwarding */
130 #ifndef _PATH_XAUTH
131 #define _PATH_XAUTH "/usr/X11R6/bin/xauth"
132 #endif
133 
134 /* UNIX domain socket for X11 server; displaynum will replace %u */
135 #ifndef _PATH_UNIX_X
136 #define _PATH_UNIX_X "/tmp/.X11-unix/X%u"
137 #endif
138 
139 /* for scp */
140 #ifndef _PATH_CP
141 #define _PATH_CP "cp"
142 #endif
143 
144 /* for sftp */
145 extern char *_PATH_SFTP_SERVER;
146 
147 /* chroot directory for unprivileged user when UsePrivilegeSeparation=yes */
148 #ifndef _PATH_PRIVSEP_CHROOT_DIR
149 #define _PATH_PRIVSEP_CHROOT_DIR "/var/empty"
150 #endif
151 
152 /* for passwd change */
153 #ifndef _PATH_PASSWD_PROG
154 #define _PATH_PASSWD_PROG "/usr/bin/passwd"
155 #endif
156 
157 #ifndef _PATH_LS
158 #define _PATH_LS "ls"
159 #endif
160 
161 /* Askpass program define */
162 #ifndef ASKPASS_PROGRAM
163 #define ASKPASS_PROGRAM "/usr/lib/ssh/ssh-askpass"
164 #endif /* ASKPASS_PROGRAM */
165 
166 /* Path to rand helper */
167 extern char *SSH_RAND_HELPER;
168 
169 /* Default user path that includes location of scp. */
170 extern char *_PATH_STDPATH_WITH_SCP;