2 * pathnames.h - define default paths for pppd
4 * Copyright (c) 1999-2024 Paul Mackerras. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in
15 * the documentation and/or other materials provided with the
18 * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
19 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
20 * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
21 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
22 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
23 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
24 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
28 * Paths are controlled by configure. Typically, one would pass the following options
30 * ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
32 * Note that if the prefix variable do control all the other directory variables, e.g
33 * sysconfdir is ${prefix}/etc. Setting prefix to /usr, you'll have to override
34 * sysconfdir with /etc to avoid installing config files into /usr/etc.
36 * In addition, there are three explicit variables that has overrides via configure:
37 * - PPPD_RUNTIME_DIR, set by --with-runtime-dir=<dir>
38 * - PPPD_LOGFILE_DIR, set by --with-logfile-dir=<dir>
39 * - PPPD_PLUGIN_DIR, set by --with-plugin-dir=<dir>
41 #ifndef PPP_PATHNAMES_H
42 #define PPP_PATHNAMES_H
48 #endif /* HAVE_PATHS_H */
51 #define _PATH_DEVNULL "/dev/null"
54 #define PPP_DEVNULL _PATH_DEVNULL
57 * PPPD_RUNTIME_DIR is set by passing --with-runtime-dir=<path> via configure
58 * the default value set by configure when option is absent is ${localstatedir}/run/pppd
60 #ifdef PPPD_RUNTIME_DIR
61 #define PPP_PATH_VARRUN PPPD_RUNTIME_DIR
63 #define PPP_PATH_VARRUN _PATH_VARRUN
67 * PPPD_LOGFILE_DIR is set by passing --with-logfile-dir=<path> via configure
68 * the default value set by configure when option is absent is ${localstatedir}/log/ppp
70 #ifdef PPPD_LOGFILE_DIR
71 #define PPP_PATH_VARLOG PPPD_LOGFILE_DIR
73 #define PPP_PATH_VARLOG _PATH_VARRUN "/log/ppp"
77 * PPPD_PLUGIN_DIR is set by passing --with-plugin-dir=<path> via configure
78 * the default value set by configure when option is absent is ${libdir}/pppd/${version}
80 #ifdef PPPD_PLUGIN_DIR
81 #define PPP_PATH_PLUGIN PPPD_PLUGIN_DIR
82 #endif /* PPPD_PLUGIN_DIR */
84 #define PPP_PATH_CONFDIR SYSCONFDIR "/ppp"
86 #define PPP_PATH_UPAPFILE PPP_PATH_CONFDIR "/pap-secrets"
87 #define PPP_PATH_CHAPFILE PPP_PATH_CONFDIR "/chap-secrets"
88 #define PPP_PATH_SRPFILE PPP_PATH_CONFDIR "/srp-secrets"
90 #ifdef PPP_WITH_EAPTLS
91 #define PPP_PATH_EAPTLSCLIFILE PPP_PATH_CONFDIR "/eaptls-client"
92 #define PPP_PATH_EAPTLSSERVFILE PPP_PATH_CONFDIR "/eaptls-server"
93 #define PPP_PATH_OPENSSLCONFFILE PPP_PATH_CONFDIR "/openssl.cnf"
94 #endif /* PPP_WITH_EAPTLS */
96 #define PPP_PATH_SYSOPTIONS PPP_PATH_CONFDIR "/options"
97 #define PPP_PATH_IPUP PPP_PATH_CONFDIR "/ip-up"
98 #define PPP_PATH_IPDOWN PPP_PATH_CONFDIR "/ip-down"
99 #define PPP_PATH_IPPREUP PPP_PATH_CONFDIR "/ip-pre-up"
100 #define PPP_PATH_AUTHUP PPP_PATH_CONFDIR "/auth-up"
101 #define PPP_PATH_AUTHDOWN PPP_PATH_CONFDIR "/auth-down"
102 #define PPP_PATH_TTYOPT PPP_PATH_CONFDIR "/options."
103 #define PPP_PATH_PEERFILES PPP_PATH_CONFDIR "/peers/"
104 #define PPP_PATH_RESOLV PPP_PATH_CONFDIR "/resolv.conf"
106 #define PPP_PATH_NET_INIT PPP_PATH_CONFDIR "/net-init"
107 #define PPP_PATH_NET_PREUP PPP_PATH_CONFDIR "/net-pre-up"
108 #define PPP_PATH_NET_DOWN PPP_PATH_CONFDIR "/net-down"
110 #define PPP_PATH_CONNERRS PPP_PATH_VARLOG "/connect-errors"
112 #define PPP_PATH_USEROPT ".ppprc"
113 #define PPP_PATH_PSEUDONYM ".ppp_pseudonym"
115 #ifdef PPP_WITH_IPV6CP
116 #define PPP_PATH_IPV6UP PPP_PATH_CONFDIR "/ipv6-up"
117 #define PPP_PATH_IPV6DOWN PPP_PATH_CONFDIR "/ipv6-down"
120 #define PPP_PATH_PPPDB PPP_PATH_VARRUN "/pppd2.tdb"
123 #define PPP_PATH_LOCKDIR "/var/lock"
126 #define PPP_PATH_LOCKDIR "/var/spool/locks"
128 #define PPP_PATH_LOCKDIR "/var/spool/lock"
133 #endif /* PPP_PATHNAMES_H */