diff options
Diffstat (limited to 'src/charon')
-rw-r--r-- | src/charon/Android.mk | 2 | ||||
-rw-r--r-- | src/charon/Makefile.in | 7 | ||||
-rw-r--r-- | src/charon/charon.c | 17 |
3 files changed, 23 insertions, 3 deletions
diff --git a/src/charon/Android.mk b/src/charon/Android.mk index 491d7f946..eb7eca9dd 100644 --- a/src/charon/Android.mk +++ b/src/charon/Android.mk @@ -17,6 +17,8 @@ LOCAL_CFLAGS := $(strongswan_CFLAGS) LOCAL_MODULE := charon +LOCAL_MODULE_TAGS := optional + LOCAL_ARM_MODE := arm LOCAL_PRELINK_MODULE := false diff --git a/src/charon/Makefile.in b/src/charon/Makefile.in index 3ba9c2731..5da167dfd 100644 --- a/src/charon/Makefile.in +++ b/src/charon/Makefile.in @@ -171,6 +171,9 @@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ +attest_plugins = @attest_plugins@ +axis2c_CFLAGS = @axis2c_CFLAGS@ +axis2c_LIBS = @axis2c_LIBS@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ @@ -179,6 +182,7 @@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ c_plugins = @c_plugins@ +clearsilver_LIBS = @clearsilver_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ dbusservicedir = @dbusservicedir@ @@ -195,11 +199,13 @@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ +imcvdir = @imcvdir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ ipsecdir = @ipsecdir@ ipsecgroup = @ipsecgroup@ +ipseclibdir = @ipseclibdir@ ipsecuser = @ipsecuser@ libcharon_plugins = @libcharon_plugins@ libdir = @libdir@ @@ -243,6 +249,7 @@ sharedstatedir = @sharedstatedir@ soup_CFLAGS = @soup_CFLAGS@ soup_LIBS = @soup_LIBS@ srcdir = @srcdir@ +starter_plugins = @starter_plugins@ strongswan_conf = @strongswan_conf@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ diff --git a/src/charon/charon.c b/src/charon/charon.c index dda09f66d..6dbb0b592 100644 --- a/src/charon/charon.c +++ b/src/charon/charon.c @@ -41,7 +41,7 @@ #include <threading/thread.h> #ifdef ANDROID -#include <private/android_filesystem_config.h> +#include <private/android_filesystem_config.h> /* for AID_VPN */ #endif #ifndef LOG_AUTHPRIV /* not defined on OpenSolaris */ @@ -242,6 +242,7 @@ static bool check_pidfile() memset(buf, 0, sizeof(buf)); if (fread(buf, 1, sizeof(buf), pidfile)) { + buf[sizeof(buf) - 1] = '\0'; pid = atoi(buf); } fclose(pidfile); @@ -290,7 +291,7 @@ static void initialize_loggers(bool use_stderr, level_t levels[]) sys_logger_t *sys_logger; file_logger_t *file_logger; enumerator_t *enumerator; - char *facility, *filename; + char *identifier, *facility, *filename; int loggers_defined = 0; debug_t group; level_t def; @@ -298,6 +299,12 @@ static void initialize_loggers(bool use_stderr, level_t levels[]) FILE *file; /* setup sysloggers */ + identifier = lib->settings->get_str(lib->settings, + "charon.syslog.identifier", NULL); + if (identifier) + { /* set identifier, which is prepended to each log line */ + openlog(identifier, 0, 0); + } enumerator = lib->settings->create_section_enumerator(lib->settings, "charon.syslog"); while (enumerator->enumerate(enumerator, &facility)) @@ -425,7 +432,7 @@ static void usage(const char *msg) " [--version]\n" " [--use-syslog]\n" " [--debug-<type> <level>]\n" - " <type>: log context type (dmn|mgr|ike|chd|job|cfg|knl|net|enc|tnc|tls|lib)\n" + " <type>: log context type (dmn|mgr|ike|chd|job|cfg|knl|net|asn|enc|tnc|imc|imv|pts|tls|lib)\n" " <level>: log verbosity (-1 = silent, 0 = audit, 1 = control,\n" " 2 = controlmore, 3 = raw, 4 = private)\n" "\n" @@ -496,8 +503,12 @@ int main(int argc, char *argv[]) { "debug-cfg", required_argument, &group, DBG_CFG }, { "debug-knl", required_argument, &group, DBG_KNL }, { "debug-net", required_argument, &group, DBG_NET }, + { "debug-asn", required_argument, &group, DBG_ASN }, { "debug-enc", required_argument, &group, DBG_ENC }, { "debug-tnc", required_argument, &group, DBG_TNC }, + { "debug-imc", required_argument, &group, DBG_IMC }, + { "debug-imv", required_argument, &group, DBG_IMV }, + { "debug-pts", required_argument, &group, DBG_PTS }, { "debug-tls", required_argument, &group, DBG_TLS }, { "debug-lib", required_argument, &group, DBG_LIB }, { 0,0,0,0 } |