diff --git a/src/archive.c b/src/archive.c index 2b4ac42..5551f14 100644 --- a/src/archive.c +++ b/src/archive.c @@ -142,13 +142,13 @@ fd = open(filename, O_RDONLY); if(fd == -1){ - printf("error reading file: %s\n", filename); + syslog(LOG_PRIORITY, "%s: cannot open()", filename); return 1; } if(fstat(fd, &st)){ - printf("cannot fstat() on %s\n", filename); + syslog(LOG_PRIORITY, "%s: cannot fstat()", filename); close(fd); return 1; } @@ -172,7 +172,7 @@ while((n = read(fd, inbuf, sizeof(inbuf)))){ if(!EVP_DecryptUpdate(&ctx, s+tlen, &olen, inbuf, n)){ - printf("EVP_DecryptUpdate()\n"); + syslog(LOG_PRIORITY, "%s: EVP_DecryptUpdate()", filename); goto CLEANUP; } @@ -181,7 +181,7 @@ if(EVP_DecryptFinal(&ctx, s + tlen, &olen) != 1){ - printf("EVP_DecryptFinal()\n"); + syslog(LOG_PRIORITY, "%s: EVP_DecryptFinal()", filename); goto CLEANUP; } diff --git a/src/config.h b/src/config.h index 84012c6..6b0f1e7 100644 --- a/src/config.h +++ b/src/config.h @@ -13,7 +13,7 @@ #define VERSION "0.1.21" -#define BUILD 716 +#define BUILD 717 #define HOSTID "mailarchiver" diff --git a/src/pilerget.c b/src/pilerget.c index 10ccbf6..e53db9e 100644 --- a/src/pilerget.c +++ b/src/pilerget.c @@ -27,6 +27,7 @@ exit(1); } + (void) openlog("pilerget", LOG_PID, LOG_MAIL); cfg = read_config(CONFIG_FILE);