aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/debug.c4
-rw-r--r--src/libstrongswan/debug.h3
-rw-r--r--src/libstrongswan/utils/leak_detective.c3
-rwxr-xr-xsrc/openac/openac.c6
4 files changed, 11 insertions, 5 deletions
diff --git a/src/libstrongswan/debug.c b/src/libstrongswan/debug.c
index 996cae502..a71e978b8 100644
--- a/src/libstrongswan/debug.c
+++ b/src/libstrongswan/debug.c
@@ -28,7 +28,7 @@
/**
* default dbg function which printf all to stderr
*/
-static void dbg_stderr(int level, char *fmt, ...)
+void dbg_default(int level, char *fmt, ...)
{
va_list args;
@@ -38,4 +38,4 @@ static void dbg_stderr(int level, char *fmt, ...)
va_end(args);
}
-void (*dbg) (int level, char *fmt, ...) = dbg_stderr;
+void (*dbg) (int level, char *fmt, ...) = dbg_default;
diff --git a/src/libstrongswan/debug.h b/src/libstrongswan/debug.h
index c424a1c11..71f2c7dfd 100644
--- a/src/libstrongswan/debug.h
+++ b/src/libstrongswan/debug.h
@@ -57,4 +57,7 @@
/** dbg function hook, uses stderr logger by default */
extern void (*dbg) (int level, char *fmt, ...);
+/** default logging function, prints to stderr */
+void dbg_default(int level, char *fmt, ...);
+
#endif /* DEBUG_H_ */
diff --git a/src/libstrongswan/utils/leak_detective.c b/src/libstrongswan/utils/leak_detective.c
index a28ebba51..dab18fd5c 100644
--- a/src/libstrongswan/utils/leak_detective.c
+++ b/src/libstrongswan/utils/leak_detective.c
@@ -190,7 +190,8 @@ whitelist_t whitelist[] = {
{getprotobynumber, 291},
{getservbyport, 311},
{register_printf_function, 159},
- {syslog, 45},
+ {syslog, 44},
+ {vsyslog, 41},
{dlopen, 109},
# ifdef LIBCURL
/* from /usr/lib/libcurl.so.3 */
diff --git a/src/openac/openac.c b/src/openac/openac.c
index 5abf964b9..0ac9f148f 100755
--- a/src/openac/openac.c
+++ b/src/openac/openac.c
@@ -206,8 +206,6 @@ static void openac_dbg(int level, char *fmt, ...)
}
}
-void (*dbg) (int level, char *fmt, ...) = openac_dbg;
-
/**
* openac main program
*/
@@ -226,6 +224,9 @@ int main(int argc, char **argv)
const time_t default_validity = 24*3600; /* 24 hours */
time_t validity = 0;
int status = 1;
+
+ /* enable openac debugging hook */
+ dbg = openac_dbg;
passphrase.ptr[0] = '\0';
groups = linked_list_create();
@@ -493,5 +494,6 @@ end:
ietfAttr_list_destroy(groups);
free(serial.ptr);
closelog();
+ dbg = dbg_default;
exit(status);
}