Merge "ipsec-tools: enable DPD and XAUTH."
diff --git a/main.c b/main.c
index acb399e..1f1b402 100644
--- a/main.c
+++ b/main.c
@@ -31,8 +31,6 @@
#include "config.h"
#include "gcmalloc.h"
-#include "vmbuf.h"
-#include "localconf.h"
#include "session.h"
#include "schedule.h"
#include "plog.h"
@@ -93,6 +91,8 @@
extern void setup(int argc, char **argv);
+char *pname;
+
static int monitor_count;
static struct {
int (*callback)(void *ctx, int fd);
@@ -115,7 +115,7 @@
#ifdef ANDROID_CHANGES
int control = get_control_and_arguments(&argc, &argv);
if (control != -1) {
- lcconf->chroot = "%p";
+ pname = "%p";
}
#endif
diff --git a/setup.c b/setup.c
index 3d402fb..27e4b5b 100644
--- a/setup.c
+++ b/setup.c
@@ -420,8 +420,8 @@
void getpathname(char *path, int length, int type, const char *name)
{
- if (localconf.chroot) {
- snprintf(path, length, localconf.chroot, name);
+ if (pname) {
+ snprintf(path, length, pname, name);
} else {
strncpy(path, name, length);
}
diff --git a/src/racoon/crypto_openssl.c b/src/racoon/crypto_openssl.c
index adbf665..215f4ef 100644
--- a/src/racoon/crypto_openssl.c
+++ b/src/racoon/crypto_openssl.c
@@ -461,11 +461,10 @@
#ifdef ANDROID_CHANGES
-#include "localconf.h"
static BIO *BIO_from_android(char *path)
{
void *data;
- if (sscanf(path, lcconf->chroot, &data) == 1) {
+ if (sscanf(path, pname, &data) == 1) {
return BIO_new_mem_buf(data, -1);
}
return NULL;
@@ -499,7 +498,7 @@
X509_STORE_set_verify_cb_func(cert_ctx, cb_check_cert_remote);
#ifdef ANDROID_CHANGES
- if (lcconf->chroot) {
+ if (pname) {
BIO *bio = BIO_from_android(CAfile);
STACK_OF(X509_INFO) *stack;
X509_INFO *info;
@@ -956,7 +955,7 @@
int error;
#ifdef ANDROID_CHANGES
- if (lcconf->chroot) {
+ if (pname) {
BIO *bio = BIO_from_android(path);
if (!bio) {
return NULL;
@@ -1062,7 +1061,7 @@
int error = -1;
#ifdef ANDROID_CHANGES
- if (lcconf->chroot) {
+ if (pname) {
BIO *bio = BIO_from_android(path);
if (!bio) {
return NULL;