Allow setting syslog identifier via startsyslog().

This commit is contained in:
Konstantin Tokarev 2015-12-01 21:54:03 +03:00
parent 2d6bbf341d
commit c59827334c
3 changed files with 4 additions and 4 deletions

View File

@ -84,9 +84,9 @@ int debug_trace = 0;
#endif
#ifndef DISABLE_SYSLOG
void startsyslog() {
void startsyslog(const char *ident) {
openlog(PROGNAME, LOG_PID, LOG_AUTHPRIV);
openlog(ident, LOG_PID, LOG_AUTHPRIV);
}
#endif /* DISABLE_SYSLOG */

View File

@ -31,7 +31,7 @@
#include "queue.h"
#ifndef DISABLE_SYSLOG
void startsyslog();
void startsyslog(const char *ident);
#endif
#ifdef __GNUC__

View File

@ -367,8 +367,8 @@ static void commonsetup() {
struct sigaction sa_chld;
#ifndef DISABLE_SYSLOG
startsyslog();
if (opts.usingsyslog) {
startsyslog(PROGNAME);
}
#endif