added vsyslog to leak detectives white list

removed debugging hook on openac cleanup
This commit is contained in:
Martin Willi
2007-09-27 06:40:50 +00:00
parent 87d0427def
commit 324abae2ef
4 changed files with 11 additions and 5 deletions
+2 -2
View File
@@ -28,7 +28,7 @@
/** /**
* default dbg function which printf all to stderr * 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; va_list args;
@@ -38,4 +38,4 @@ static void dbg_stderr(int level, char *fmt, ...)
va_end(args); va_end(args);
} }
void (*dbg) (int level, char *fmt, ...) = dbg_stderr; void (*dbg) (int level, char *fmt, ...) = dbg_default;
+3
View File
@@ -57,4 +57,7 @@
/** dbg function hook, uses stderr logger by default */ /** dbg function hook, uses stderr logger by default */
extern void (*dbg) (int level, char *fmt, ...); extern void (*dbg) (int level, char *fmt, ...);
/** default logging function, prints to stderr */
void dbg_default(int level, char *fmt, ...);
#endif /* DEBUG_H_ */ #endif /* DEBUG_H_ */
+2 -1
View File
@@ -190,7 +190,8 @@ whitelist_t whitelist[] = {
{getprotobynumber, 291}, {getprotobynumber, 291},
{getservbyport, 311}, {getservbyport, 311},
{register_printf_function, 159}, {register_printf_function, 159},
{syslog, 45}, {syslog, 44},
{vsyslog, 41},
{dlopen, 109}, {dlopen, 109},
# ifdef LIBCURL # ifdef LIBCURL
/* from /usr/lib/libcurl.so.3 */ /* from /usr/lib/libcurl.so.3 */
+4 -2
View File
@@ -206,8 +206,6 @@ static void openac_dbg(int level, char *fmt, ...)
} }
} }
void (*dbg) (int level, char *fmt, ...) = openac_dbg;
/** /**
* openac main program * openac main program
*/ */
@@ -227,6 +225,9 @@ int main(int argc, char **argv)
time_t validity = 0; time_t validity = 0;
int status = 1; int status = 1;
/* enable openac debugging hook */
dbg = openac_dbg;
passphrase.ptr[0] = '\0'; passphrase.ptr[0] = '\0';
groups = linked_list_create(); groups = linked_list_create();
@@ -493,5 +494,6 @@ end:
ietfAttr_list_destroy(groups); ietfAttr_list_destroy(groups);
free(serial.ptr); free(serial.ptr);
closelog(); closelog();
dbg = dbg_default;
exit(status); exit(status);
} }