2 * pathnames.h - define default paths for pppd
4 * Copyright (c) 1999-2002 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. The name(s) of the authors of this software must not be used to
14 * endorse or promote products derived from this software without
15 * prior written permission.
17 * 3. Redistributions of any form whatsoever must retain the following
19 * "This product includes software developed by Paul Mackerras
20 * <paulus@samba.org>".
22 * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO
23 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
24 * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
25 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
26 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
27 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
28 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
32 * Paths are controlled by configure. Typically, one would pass the following options
34 * ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
36 * Note that if the prefix variable do control all the other directory variables, e.g
37 * sysconfdir is ${prefix}/etc. Setting prefix to /usr, you'll have to override
38 * sysconfdir with /etc to avoid installing config files into /usr/etc.
40 * In addition, there are three explicit variables that has overrides via configure:
41 * - PPPD_RUNTIME_DIR, set by --with-runtime-dir=<dir>
42 * - PPPD_LOGFILE_DIR, set by --with-logfile-dir=<dir>
43 * - PPPD_PLUGIN_DIR, set by --with-plugin-dir=<dir>
45 #ifndef PPP_PATHNAMES_H
46 #define PPP_PATHNAMES_H
52 #endif /* HAVE_PATHS_H */
55 #define _PATH_DEVNULL "/dev/null"
58 #define PPP_DEVNULL _PATH_DEVNULL
61 * PPPD_RUNTIME_DIR is set by passing --with-runtime-dir=<path> via configure
62 * the default value set by configure when option is absent is ${localstatedir}/run/pppd
64 #ifdef PPPD_RUNTIME_DIR
65 #define PPP_PATH_VARRUN PPPD_RUNTIME_DIR
67 #define PPP_PATH_VARRUN _PATH_VARRUN
71 * PPPD_LOGFILE_DIR is set by passing --with-logfile-dir=<path> via configure
72 * the default value set by configure when option is absent is ${localstatedir}/log/ppp
74 #ifdef PPPD_LOGFILE_DIR
75 #define PPP_PATH_VARLOG PPPD_LOGFILE_DIR
77 #define PPP_PATH_VARLOG _PATH_VARRUN "/log/ppp"
81 * PPPD_PLUGIN_DIR is set by passing --with-plugin-dir=<path> via configure
82 * the default value set by configure when option is absent is ${libdir}/pppd/${version}
84 #ifdef PPPD_PLUGIN_DIR
85 #define PPP_PATH_PLUGIN PPPD_PLUGIN_DIR
86 #endif /* PPPD_PLUGIN_DIR */
88 #define PPP_PATH_CONFDIR SYSCONFDIR "/ppp"
90 #define PPP_PATH_UPAPFILE PPP_PATH_CONFDIR "/pap-secrets"
91 #define PPP_PATH_CHAPFILE PPP_PATH_CONFDIR "/chap-secrets"
92 #define PPP_PATH_SRPFILE PPP_PATH_CONFDIR "/srp-secrets"
94 #ifdef PPP_WITH_EAPTLS
95 #define PPP_PATH_EAPTLSCLIFILE PPP_PATH_CONFDIR "/eaptls-client"
96 #define PPP_PATH_EAPTLSSERVFILE PPP_PATH_CONFDIR "/eaptls-server"
97 #define PPP_PATH_OPENSSLCONFFILE PPP_PATH_CONFDIR "/openssl.cnf"
98 #endif /* PPP_WITH_EAPTLS */
100 #define PPP_PATH_SYSOPTIONS PPP_PATH_CONFDIR "/options"
101 #define PPP_PATH_IPUP PPP_PATH_CONFDIR "/ip-up"
102 #define PPP_PATH_IPDOWN PPP_PATH_CONFDIR "/ip-down"
103 #define PPP_PATH_IPPREUP PPP_PATH_CONFDIR "/ip-pre-up"
104 #define PPP_PATH_AUTHUP PPP_PATH_CONFDIR "/auth-up"
105 #define PPP_PATH_AUTHDOWN PPP_PATH_CONFDIR "/auth-down"
106 #define PPP_PATH_TTYOPT PPP_PATH_CONFDIR "/options."
107 #define PPP_PATH_PEERFILES PPP_PATH_CONFDIR "/peers/"
108 #define PPP_PATH_RESOLV PPP_PATH_CONFDIR "/resolv.conf"
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 PPP_PATH_VARRUN "/lock"
126 #define PPP_PATH_LOCKDIR LOCALSTATEDIR "/spool/locks"
128 #define PPP_PATH_LOCKDIR LOCALSTATEDIR "/spool/lock"
133 #endif /* PPP_PATHNAMES_H */