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