]> granicus.if.org Git - sudo/blob - pathnames.h.in
If the sudoreplay ID option is a fully-qualified path, use it directly.
[sudo] / pathnames.h.in
1 /*
2  * SPDX-License-Identifier: ISC
3  *
4  * Copyright (c) 1996, 1998, 1999, 2001, 2004, 2005, 2007-2014
5  *      Todd C. Miller <Todd.Miller@sudo.ws>.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18  *
19  * Sponsored in part by the Defense Advanced Research Projects
20  * Agency (DARPA) and Air Force Research Laboratory, Air Force
21  * Materiel Command, USAF, under agreement number F39502-99-1-0512.
22  */
23
24 /*
25  *  Pathnames to programs and files used by sudo.
26  */
27
28 #ifdef HAVE_PATHS_H
29 # include <paths.h>
30 #endif /* HAVE_PATHS_H */
31
32 #ifdef HAVE_MAILLOCK_H
33 # include <maillock.h>
34 #endif /* HAVE_MAILLOCK_H */
35
36 #ifndef _PATH_DEV
37 # define _PATH_DEV              "/dev/"
38 #endif /* _PATH_DEV */
39
40 #ifndef _PATH_TTY
41 # define _PATH_TTY              _PATH_DEV "tty"
42 #endif /* _PATH_TTY */
43
44 #ifndef _PATH_DEVNULL
45 # define _PATH_DEVNULL          _PATH_DEV "null"
46 #endif /* _PATH_DEVNULL */
47
48 #ifndef _PATH_DEFPATH
49 # define _PATH_DEFPATH          "/usr/bin:/bin"
50 #endif /* _PATH_DEFPATH */
51
52 #ifndef _PATH_STDPATH
53 # define _PATH_STDPATH          "/usr/bin:/bin:/usr/sbin:/sbin"
54 #endif /* _PATH_STDPATH */
55
56 #ifndef _PATH_ENVIRONMENT
57 # define _PATH_ENVIRONMENT      "/etc/environment"
58 #endif /* _PATH_ENVIRONMENT */
59
60 /*
61  * NOTE: _PATH_SUDO_CONF is usually overridden by the Makefile.
62  */
63 #ifndef _PATH_SUDO_CONF
64 # define _PATH_SUDO_CONF        "/etc/sudo.conf"
65 #endif /* _PATH_SUDO_CONF */
66
67 /*
68  * NOTE: _PATH_SUDOERS is usually overridden by the Makefile.
69  */
70 #ifndef _PATH_SUDOERS
71 # define _PATH_SUDOERS          "/etc/sudoers"
72 #endif /* _PATH_SUDOERS */
73
74 /*
75  * NOTE: _PATH_CVTSUDOERS_CONF is usually overridden by the Makefile.
76  */
77 #ifndef _PATH_CVTSUDOERS_CONF
78 # define _PATH_CVTSUDOERS_CONF          "/etc/cvtsudoers.conf"
79 #endif /* _PATH_CVTSUDOERS_CONF */
80
81 /*
82  * The following paths are controlled via the configure script.
83  */
84
85 /*
86  * Where to store the time stamp files.  Defaults to /var/run/sudo/ts,
87  * /var/db/sudo/ts, /var/lib/sudo/ts, /var/adm/sudo/ts or /usr/adm/sudo/ts
88  * depending on what exists on the system.
89  */
90 #ifndef _PATH_SUDO_TIMEDIR
91 # undef _PATH_SUDO_TIMEDIR
92 #endif /* _PATH_SUDO_TIMEDIR */
93
94 /*
95  * Where to store the lecture status files.  Defaults to /var/db/sudo/lectured,
96  * /var/lib/sudo/lectured, /var/adm/sudo/lectured or /usr/adm/sudo/lectured
97  * depending on what exists on the system.
98  */
99 #ifndef _PATH_SUDO_LECTURE_DIR
100 # undef _PATH_SUDO_LECTURE_DIR
101 #endif /* _PATH_SUDO_LECTURE_DIR */
102
103 /*
104  * Where to put the I/O log files.  Defaults to /var/log/sudo-io,
105  * /var/adm/sudo-io or /usr/adm/sudo-io depending on what exists.
106  */
107 #ifndef _PATH_SUDO_IO_LOGDIR
108 # undef _PATH_SUDO_IO_LOGDIR
109 #endif /* _PATH_SUDO_IO_LOGDIR */
110
111 /*
112  * Where to put the sudo log file when logging to a file.  Defaults to
113  * /var/log/sudo.log if /var/log exists, else /var/adm/sudo.log.
114  */
115 #ifndef _PATH_SUDO_LOGFILE
116 # undef _PATH_SUDO_LOGFILE
117 #endif /* _PATH_SUDO_LOGFILE */
118
119 #ifndef _PATH_SUDO_SENDMAIL
120 # undef _PATH_SUDO_SENDMAIL
121 #endif /* _PATH_SUDO_SENDMAIL */
122
123 #ifndef _PATH_SUDO_NOEXEC
124 # undef _PATH_SUDO_NOEXEC
125 #endif /* _PATH_SUDO_NOEXEC */
126
127 #ifndef _PATH_SUDO_ASKPASS
128 # undef _PATH_SUDO_ASKPASS
129 #endif /* _PATH_SUDO_ASKPASS */
130
131 #ifndef _PATH_SUDO_PLUGIN_DIR
132 # undef _PATH_SUDO_PLUGIN_DIR
133 #endif /* _PATH_SUDO_PLUGIN_DIR */
134
135 #ifndef _PATH_SUDO_DEVSEARCH
136 # undef _PATH_SUDO_DEVSEARCH
137 #endif /* _PATH_SUDO_DEVSEARCH */
138
139 #ifndef _PATH_VI
140 # undef _PATH_VI
141 #endif /* _PATH_VI */
142
143 #ifndef _PATH_MV
144 # undef _PATH_MV
145 #endif /* _PATH_MV */
146
147 #ifndef _PATH_BSHELL
148 # undef _PATH_BSHELL
149 #endif /* _PATH_BSHELL */
150
151 #ifndef _PATH_TMP
152 # define _PATH_TMP      "/tmp/"
153 #endif /* _PATH_TMP */
154
155 #ifndef _PATH_VARTMP
156 # define _PATH_VARTMP   "/var/tmp/"
157 #endif /* _PATH_VARTMP */
158
159 #ifndef _PATH_USRTMP
160 # define _PATH_USRTMP   "/usr/tmp/"
161 #endif /* _PATH_USRTMP */
162
163 #ifndef _PATH_MAILDIR
164 # undef _PATH_MAILDIR
165 #endif /* _PATH_MAILDIR */
166
167 #ifndef _PATH_UTMP
168 # undef _PATH_UTMP
169 #endif /* _PATH_UTMP */
170
171 #ifndef _PATH_SUDO_SESH
172 # undef _PATH_SUDO_SESH
173 #endif /* _PATH_SUDO_SESH */
174
175 #ifndef _PATH_LDAP_CONF
176 # undef _PATH_LDAP_CONF
177 #endif /* _PATH_LDAP_CONF */
178
179 #ifndef _PATH_LDAP_SECRET
180 # undef _PATH_LDAP_SECRET
181 #endif /* _PATH_LDAP_SECRET */
182
183 #ifndef _PATH_SSSD_CONF
184 # undef  _PATH_SSSD_CONF
185 #endif /* _PATH_SSSD_CONF */
186
187 #ifndef _PATH_SSSD_LIB
188 # undef  _PATH_SSSD_LIB
189 #endif /* _PATH_SSSD_LIB */
190
191 #ifndef _PATH_NSSWITCH_CONF
192 # undef _PATH_NSSWITCH_CONF
193 #endif /* _PATH_NSSWITCH_CONF */
194
195 #ifndef _PATH_NETSVC_CONF
196 # undef _PATH_NETSVC_CONF
197 #endif /* _PATH_NETSVC_CONF */
198
199 #ifndef _PATH_ZONEINFO
200 # undef _PATH_ZONEINFO
201 #endif /* _PATH_ZONEINFO */
202
203 /* On AIX, _PATH_BSHELL in paths.h is /usr/bin/bsh but we want /usr/bin/sh */
204 #ifndef _PATH_SUDO_BSHELL
205 # if defined(_AIX) && defined(HAVE_PATHS_H)
206 #  define _PATH_SUDO_BSHELL "/usr/bin/sh"
207 # else
208 #  define _PATH_SUDO_BSHELL _PATH_BSHELL
209 # endif
210 #endif /* _PATH_SUDO_BSHELL */