Additional fixes for various configure options (less frequently used) that broke
[PPPD_LOGFILE_DIR="${localstatedir}/log/ppp"])
AC_SUBST(PPPD_LOGFILE_DIR)
+#
+# System CA certificates path
+AC_ARG_WITH(system-ca-path,
+ AS_HELP_STRING([--with-system-ca-path=/path/to/ssl/certs], [path to system CA certificates]),
+ [
+ case "$withval" in
+ "" | y | ye | yes)
+ with_system_ca_path="${sysconfdir}/ssl/certs"
+ ;;
+ n | no)
+ ;;
+ *)
+ with_system_ca_path="$withval"
+ ;;
+ esac
+ ],[with_system_ca_path="${sysconfdir}/ssl/certs"])
+AM_CONDITIONAL(PPP_WITH_SYSTEM_CA_PATH, [test "$with_system_ca_path" != "no"])
+AM_COND_IF(PPP_WITH_SYSTEM_CA_PATH, [
+ SYSTEM_CA_PATH="$with_system_ca_path"
+])
+AC_SUBST(SYSTEM_CA_PATH)
+
#
# Check for OpenSSL
AX_CHECK_OPENSSL
Runtime Dir..........: $PPPD_RUNTIME_DIR
Logfile Dir..........: $PPPD_LOGFILE_DIR
Plugin Dir...........: $PPPD_PLUGIN_DIR
+ System CA Path ......: ${SYSTEM_CA_PATH:-not set}
With OpenSSL.........: ${with_openssl:-yes}
With libatm..........: ${with_atm:-no}
With libpam..........: ${with_pam:-no}
pppd_LDFLAGS =
pppd_LIBS =
+if PPP_WITH_SYSTEM_CA_PATH
+pppd_CPPFLAGS += -DSYSTEM_CA_PATH='"@SYSTEM_CA_PATH@"'
+endif
+
if LINUX
pppd_SOURCES += sys-linux.c
noinst_HEADERS += termios_linux.h
if (user[0] == 0 && !explicit_user)
strlcpy(user, our_name, sizeof(user));
+#if defined(SYSTEM_CA_PATH) && (defined(PPP_WITH_EAPTLS) || defined(PPP_WITH_PEAP))
+ /* Use system default for CA Path if not specified */
+ if (!ca_path) {
+ ca_path = SYSTEM_CA_PATH;
+ }
+#endif
+
/*
* If we have a default route, require the peer to authenticate
* unless the noauth option was given or the real user is root.
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#ifndef CBCP_H
-#define CBCP_H
+#ifndef PPP_CBCP_H
+#define PPP_CBCP_H
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct cbcp_state {
int us_unit; /* Interface unit number */
u_char us_id; /* Current id */
#define CB_CONF_USER 2
#define CB_CONF_ADMIN 3
#define CB_CONF_LIST 4
+
+#ifdef __cplusplus
+}
#endif
+
+#endif // PPP_CBCP_H
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct ccp_options {
bool bsd_compress; /* do BSD Compress? */
bool deflate; /* do Deflate? */
extern struct protent ccp_protent;
+#ifdef __cplusplus
+}
#endif
+
+#endif // PPP_CCP_H
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* CHAP packets begin with a standard header with code, id, len (2 bytes).
*/
/* Represents the CHAP protocol to the main pppd code */
extern struct protent chap_protent;
+#ifdef __cplusplus
+}
#endif
+
+#endif // PPP_CHAP_NEW_H
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define MAX_NT_PASSWORD 256 /* Max (Unicode) chars in an NT pass */
#define MS_CHAP_RESPONSE_LEN 49 /* Response length for MS-CHAP */
void chapms_init(void);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PPP_CHAPMS_H */
#ifndef PPP_CRYPTO_H
#define PPP_CRYPTO_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef MD5_DIGEST_LENGTH
#define MD5_DIGEST_LENGTH 16
#endif
*/
int PPP_crypto_deinit();
+#ifdef __cplusplus
+}
#endif
+
+#endif // PPP_CRYPTO_H
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* This is the DES encrypt functions as described by RFC2759.
*
int DesDecrypt(const unsigned char *cipher, const unsigned char *key,
unsigned char *clear);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PPP_PPPCRYPT_H */
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef PPP_ECP
#define PPP_ECP 0x8053
#endif
extern struct protent ecp_protent;
+#ifdef __cplusplus
+}
#endif
+
+#endif // PPP_ECP_H
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#if defined(SOL2)
#include <netinet/in.h>
char *eui64_ntoa(eui64_t); /* Returns ascii representation of id */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PPP_EUI64_H */
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Packet header = Code, id, length.
*/
#define HEADERLEN 4
-
/*
* CP (LCP, IPCP, etc.) codes.
*/
*/
extern int peer_mru[]; /* currently negotiated peer MRU (per unit) */
+#ifdef __cplusplus
+}
#endif
+
+#endif // PPP_FSM_H
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Options.
*/
typedef void (ip_choose_hook_fn)(uint32_t *);
extern ip_choose_hook_fn *ip_choose_hook;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PPP_IPCP_H */
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Original version, based on RFC2023 :
Copyright (c) 1995, 1996, 1997 Francis.Dupont@inria.fr, INRIA Rocquencourt,
typedef void (ipv6_down_hook_fn)(void);
extern ipv6_down_hook_fn *ipv6_down_hook;
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/*
* Options.
*/
before deciding the link is looped-back. */
#define DEFLOOPBACKFAIL 10
+
+#ifdef __cplusplus
+}
#endif
+
+#endif // PPP_LCP_H
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void magic_init (void); /* Initialize the magic number generator */
u_int32_t magic (void); /* Returns the next magic number */
/* Fill buffer with random bytes */
void random_bytes (unsigned char *buf, int len);
+#ifdef __cplusplus
+}
#endif
+
+#endif // PPP_MAGIC_H
[NF_SIGNALED ] = &sigreceived,
[NF_IP_UP ] = &ip_up_notifier,
[NF_IP_DOWN ] = &ip_down_notifier,
+#ifdef PPP_WITH_IPV6CP
[NF_IPV6_UP ] = &ipv6_up_notifier,
[NF_IPV6_DOWN ] = &ipv6_down_notifier,
+#endif
[NF_AUTH_UP ] = &auth_up_notifier,
[NF_LINK_DOWN ] = &link_down_notifier,
[NF_FORK ] = &fork_notifier,
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
#define MPPE_PAD 4 /* MPPE growth per frame */
#define MPPE_MAX_KEY_SIZE 32 /* Largest key length */
#define MPPE_MAX_KEY_LEN 16 /* Largest key size accepted by the kernel */
unsigned char *NTResponse, int IsServer);
#endif // #ifdef PPP_WITH_MPPE
+
+#ifdef __cplusplus
+}
+#endif
+
#endif // #ifdef PPP_MPPE_H
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* values for epdisc.class
*/
}
#endif // PPP_WITH_MULTILINK
+
+#ifdef __cplusplus
+}
+#endif
+
#endif // PPP_MULTILINK_H
#ifndef PPP_OPTIONS_H
#define PPP_OPTIONS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
enum opt_type {
o_special_noarg,
o_special,
/* Print an error message about an option */
void ppp_option_error(char *fmt, ...);
+
+#ifdef __cplusplus
+}
#endif
+
+#endif // PPP_OPTIONS_H
if ((p = (struct map2id_s *)malloc(sizeof(*p))) == NULL) {
novm("rc_read_mapfile");
+ fclose(mapfd);
return (-1);
}
} else {
error("rc_read_mapfile: malformed line in %s, line %d", filename, lnr);
+ fclose(mapfd);
return (-1);
}
if ((pos = strcspn(p, "\t ")) == 0) {
error("%s: line %d: bogus format: %s", filename, line, p);
+ fclose(configfd);
return (-1);
}
if (option->status != ST_UNDEF) {
error("%s: line %d: duplicate option line: %s", filename, line, p);
+ fclose(configfd);
return (-1);
}
switch (option->type) {
case OT_STR:
if (set_option_str(filename, line, option, p) < 0)
+ fclose(configfd);
return (-1);
break;
case OT_INT:
if (set_option_int(filename, line, option, p) < 0)
+ fclose(configfd);
return (-1);
break;
case OT_SRV:
if (set_option_srv(filename, line, option, p) < 0)
+ fclose(configfd);
return (-1);
break;
case OT_AUO:
if (set_option_auo(filename, line, option, p) < 0)
+ fclose(configfd);
return (-1);
break;
default:
#ifndef PPP_PPPD_H
#define PPP_PPPD_H
-#ifdef HAVE_STDARG_H
#include <stdarg.h>
-#endif
-
-#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
-#endif
-
-#ifdef HAVE_STDDEF_H
#include <stddef.h>
-#endif
-
-#ifdef HAVE_STDINT_H
#include <stdint.h>
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
-#endif
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Limits
*/
extern void (*snoop_recv_hook)(unsigned char *p, int len);
extern void (*snoop_send_hook)(unsigned char *p, int len);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* PPP_PPPD_H */
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define SESS_AUTH 1 /* Check User Authentication */
#define SESS_ACCT 2 /* Check Account Validity */
void
session_end(const char* tty);
+#ifdef __cplusplus
+}
+#endif
+
#endif // PPP_SESSION_H
#include "pppdconf.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/*
* Packet header = Code, id, length.
*/
*/
extern pap_passwd_hook_fn *pap_passwd_hook;
+#ifdef __cplusplus
+}
+#endif
+
#endif // PPP_UPAP_H