pathnames.h revision 126277
1126277Sdes/*	$OpenBSD: pathnames.h,v 1.14 2004/01/30 09:48:57 markus Exp $	*/
276259Sgreen
376259Sgreen/*
476259Sgreen * Author: Tatu Ylonen <ylo@cs.hut.fi>
576259Sgreen * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
676259Sgreen *                    All rights reserved
776259Sgreen *
876259Sgreen * As far as I am concerned, the code I have written for this software
976259Sgreen * can be used freely for any purpose.  Any derived versions of this
1076259Sgreen * software must be clearly marked as such, and if the derived work is
1176259Sgreen * incompatible with the protocol description in the RFC file, it must be
1276259Sgreen * called by a name other than "ssh" or "Secure Shell".
1376259Sgreen */
1476259Sgreen
1592559Sdes#define ETCDIR				"/etc"
1698941Sdes
1798941Sdes#ifndef SSHDIR
1892559Sdes#define SSHDIR				ETCDIR "/ssh"
1998941Sdes#endif
2098941Sdes
2198941Sdes#ifndef _PATH_SSH_PIDDIR
2276259Sgreen#define _PATH_SSH_PIDDIR		"/var/run"
2398941Sdes#endif
2476259Sgreen
2576259Sgreen/*
2676259Sgreen * System-wide file containing host keys of known hosts.  This file should be
2776259Sgreen * world-readable.
2876259Sgreen */
2992559Sdes#define _PATH_SSH_SYSTEM_HOSTFILE	SSHDIR "/ssh_known_hosts"
3092559Sdes/* backward compat for protocol 2 */
3192559Sdes#define _PATH_SSH_SYSTEM_HOSTFILE2	SSHDIR "/ssh_known_hosts2"
3276259Sgreen
3376259Sgreen/*
3476259Sgreen * Of these, ssh_host_key must be readable only by root, whereas ssh_config
3576259Sgreen * should be world-readable.
3676259Sgreen */
3792559Sdes#define _PATH_SERVER_CONFIG_FILE	SSHDIR "/sshd_config"
3892559Sdes#define _PATH_HOST_CONFIG_FILE		SSHDIR "/ssh_config"
3992559Sdes#define _PATH_HOST_KEY_FILE		SSHDIR "/ssh_host_key"
4092559Sdes#define _PATH_HOST_DSA_KEY_FILE		SSHDIR "/ssh_host_dsa_key"
4192559Sdes#define _PATH_HOST_RSA_KEY_FILE		SSHDIR "/ssh_host_rsa_key"
4292559Sdes#define _PATH_DH_MODULI			SSHDIR "/moduli"
4392559Sdes/* Backwards compatibility */
4492559Sdes#define _PATH_DH_PRIMES			SSHDIR "/primes"
4576259Sgreen
4698941Sdes#ifndef _PATH_SSH_PROGRAM
4776259Sgreen#define _PATH_SSH_PROGRAM		"/usr/bin/ssh"
4898941Sdes#endif
4976259Sgreen
5076259Sgreen/*
5176259Sgreen * The process id of the daemon listening for connections is saved here to
5276259Sgreen * make it easier to kill the correct daemon when necessary.
5376259Sgreen */
5476259Sgreen#define _PATH_SSH_DAEMON_PID_FILE	_PATH_SSH_PIDDIR "/sshd.pid"
5576259Sgreen
5676259Sgreen/*
5776259Sgreen * The directory in user\'s home directory in which the files reside. The
5876259Sgreen * directory should be world-readable (though not all files are).
5976259Sgreen */
6076259Sgreen#define _PATH_SSH_USER_DIR		".ssh"
6176259Sgreen
6276259Sgreen/*
6376259Sgreen * Per-user file containing host keys of known hosts.  This file need not be
6476259Sgreen * readable by anyone except the user him/herself, though this does not
6576259Sgreen * contain anything particularly secret.
6676259Sgreen */
6776259Sgreen#define _PATH_SSH_USER_HOSTFILE		"~/.ssh/known_hosts"
6892559Sdes/* backward compat for protocol 2 */
6976259Sgreen#define _PATH_SSH_USER_HOSTFILE2	"~/.ssh/known_hosts2"
7076259Sgreen
7176259Sgreen/*
7276259Sgreen * Name of the default file containing client-side authentication key. This
7376259Sgreen * file should only be readable by the user him/herself.
7476259Sgreen */
7576259Sgreen#define _PATH_SSH_CLIENT_IDENTITY	".ssh/identity"
7676259Sgreen#define _PATH_SSH_CLIENT_ID_DSA		".ssh/id_dsa"
7776259Sgreen#define _PATH_SSH_CLIENT_ID_RSA		".ssh/id_rsa"
7876259Sgreen
7976259Sgreen/*
8076259Sgreen * Configuration file in user\'s home directory.  This file need not be
8176259Sgreen * readable by anyone but the user him/herself, but does not contain anything
8276259Sgreen * particularly secret.  If the user\'s home directory resides on an NFS
8376259Sgreen * volume where root is mapped to nobody, this may need to be world-readable.
8476259Sgreen */
8576259Sgreen#define _PATH_SSH_USER_CONFFILE		".ssh/config"
8676259Sgreen
8776259Sgreen/*
8876259Sgreen * File containing a list of those rsa keys that permit logging in as this
8976259Sgreen * user.  This file need not be readable by anyone but the user him/herself,
9076259Sgreen * but does not contain anything particularly secret.  If the user\'s home
9176259Sgreen * directory resides on an NFS volume where root is mapped to nobody, this
9276259Sgreen * may need to be world-readable.  (This file is read by the daemon which is
9376259Sgreen * running as root.)
9476259Sgreen */
9576259Sgreen#define _PATH_SSH_USER_PERMITTED_KEYS	".ssh/authorized_keys"
9692559Sdes
9792559Sdes/* backward compat for protocol v2 */
9876259Sgreen#define _PATH_SSH_USER_PERMITTED_KEYS2	".ssh/authorized_keys2"
9976259Sgreen
10076259Sgreen/*
10176259Sgreen * Per-user and system-wide ssh "rc" files.  These files are executed with
10276259Sgreen * /bin/sh before starting the shell or command if they exist.  They will be
10376259Sgreen * passed "proto cookie" as arguments if X11 forwarding with spoofing is in
10476259Sgreen * use.  xauth will be run if neither of these exists.
10576259Sgreen */
10676259Sgreen#define _PATH_SSH_USER_RC		".ssh/rc"
10792559Sdes#define _PATH_SSH_SYSTEM_RC		SSHDIR "/sshrc"
10876259Sgreen
10976259Sgreen/*
11076259Sgreen * Ssh-only version of /etc/hosts.equiv.  Additionally, the daemon may use
11176259Sgreen * ~/.rhosts and /etc/hosts.equiv if rhosts authentication is enabled.
11276259Sgreen */
11392559Sdes#define _PATH_SSH_HOSTS_EQUIV		SSHDIR "/shosts.equiv"
11476259Sgreen#define _PATH_RHOSTS_EQUIV		"/etc/hosts.equiv"
11576259Sgreen
11676259Sgreen/*
11776259Sgreen * Default location of askpass
11876259Sgreen */
11998941Sdes#ifndef _PATH_SSH_ASKPASS_DEFAULT
12076259Sgreen#define _PATH_SSH_ASKPASS_DEFAULT	"/usr/X11R6/bin/ssh-askpass"
12198941Sdes#endif
12276259Sgreen
12398684Sdes/* Location of ssh-keysign for hostbased authentication */
12498941Sdes#ifndef _PATH_SSH_KEY_SIGN
12598941Sdes#define _PATH_SSH_KEY_SIGN            "/usr/libexec/ssh-keysign"
12698941Sdes#endif
12798684Sdes
12892559Sdes/* xauth for X11 forwarding */
12998941Sdes#ifndef _PATH_XAUTH
13092559Sdes#define _PATH_XAUTH			"/usr/X11R6/bin/xauth"
13198941Sdes#endif
13292559Sdes
13392559Sdes/* UNIX domain socket for X11 server; displaynum will replace %u */
13498941Sdes#ifndef _PATH_UNIX_X
13592559Sdes#define _PATH_UNIX_X "/tmp/.X11-unix/X%u"
13698941Sdes#endif
13792559Sdes
13898941Sdes/* for scp */
13998941Sdes#ifndef _PATH_CP
14098941Sdes#define _PATH_CP			"cp"
14198941Sdes#endif
14298941Sdes
14376259Sgreen/* for sftp */
14498941Sdes#ifndef _PATH_SFTP_SERVER
14576259Sgreen#define _PATH_SFTP_SERVER		"/usr/libexec/sftp-server"
14698941Sdes#endif
14798684Sdes
14898684Sdes/* chroot directory for unprivileged user when UsePrivilegeSeparation=yes */
14998941Sdes#ifndef _PATH_PRIVSEP_CHROOT_DIR
15098684Sdes#define _PATH_PRIVSEP_CHROOT_DIR	"/var/empty"
15198941Sdes#endif
15298941Sdes
153126277Sdes/* for passwd change */
154126277Sdes#ifndef _PATH_PASSWD_PROG
155126277Sdes#define _PATH_PASSWD_PROG             "/usr/bin/passwd"
156126277Sdes#endif
157126277Sdes
15898941Sdes#ifndef _PATH_LS
15998941Sdes#define _PATH_LS			"ls"
16098941Sdes#endif
16198941Sdes
16298941Sdes/* path to login program */
16398941Sdes#ifndef LOGIN_PROGRAM
16498941Sdes# ifdef LOGIN_PROGRAM_FALLBACK
16598941Sdes#  define LOGIN_PROGRAM         LOGIN_PROGRAM_FALLBACK
16698941Sdes# else
16798941Sdes#  define LOGIN_PROGRAM         "/usr/bin/login"
16898941Sdes# endif
16998941Sdes#endif /* LOGIN_PROGRAM */
17098941Sdes
17198941Sdes/* Askpass program define */
17298941Sdes#ifndef ASKPASS_PROGRAM
17398941Sdes#define ASKPASS_PROGRAM         "/usr/lib/ssh/ssh-askpass"
17498941Sdes#endif /* ASKPASS_PROGRAM */
175