From: Neil Brown Date: Fri, 20 Apr 2007 02:42:07 +0000 (+1000) Subject: syslog fixes X-Git-Tag: portmap_6.0~22 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=7a0df690e9dbc71c8057c9251f0c092a4d991720;p=portmap.git syslog fixes Use LOG_DAEMON rather than LOG_MAIL, and add LOG_NDELAY. Fedora Likes LOG_AUTH SuSE Likes LOG_AUTH Debian Likes LOG_DAEMON I prefer LOG_DAEMON. --- diff --git a/Makefile b/Makefile index c6a7a78..5d86348 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ # if you disagree. See `man 3 syslog' for examples. Some syslog versions # do not provide this flexibility. # -FACILITY=LOG_MAIL +FACILITY=LOG_DAEMON # To disable tcp-wrapper style access control, comment out the following # macro definitions. Access control can also be turned off by providing diff --git a/portmap.c b/portmap.c index c3c72b9..343477b 100644 --- a/portmap.c +++ b/portmap.c @@ -183,11 +183,11 @@ main(int argc, char **argv) exit(1); } -#ifdef LOG_MAIL - openlog("portmap", debugging ? LOG_PID | LOG_PERROR : LOG_PID, +#ifdef LOG_DAEMON + openlog("portmap", LOG_PID|LOG_NDELAY | ( debugging ? LOG_PERROR : 0), FACILITY); #else - openlog("portmap", debugging ? LOG_PID | LOG_PERROR : LOG_PID); + openlog("portmap", LOG_PID|LOG_NDELAY | ( debugging ? LOG_PERROR : 0)); #endif if ((sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) < 0) {