From 7a0df690e9dbc71c8057c9251f0c092a4d991720 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Fri, 20 Apr 2007 12:42:07 +1000 Subject: [PATCH] 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. --- Makefile | 2 +- portmap.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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) { -- 2.39.5