summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-12-03 03:21:25 +0000
committerAndrew Tridgell <tridge@samba.org>1997-12-03 03:21:25 +0000
commitcc12fc66d1f958c3c04d6f106b4e9128f6bce925 (patch)
tree6808334a771d69d1598331a3ecd56ada703e76b3
parentbd1abc6927d9f99161c3b6fa2a715d935fa24bf1 (diff)
downloadsamba-cc12fc66d1f958c3c04d6f106b4e9128f6bce925.tar.gz
samba-cc12fc66d1f958c3c04d6f106b4e9128f6bce925.tar.bz2
samba-cc12fc66d1f958c3c04d6f106b4e9128f6bce925.zip
I'm slowly getting though the todo list :-)
This change allows people to select the SYSLOG_FACILITY in local.h, or add it to the Makefile if they want to. (This used to be commit afe88facbfb85113105bf516e066b6c1e971f6b7)
-rw-r--r--source3/include/local.h5
-rw-r--r--source3/lib/util.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/source3/include/local.h b/source3/include/local.h
index 2e7fa22354..9a31032ee6 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -25,6 +25,11 @@
*/
#define PRINTCAP_NAME "/etc/printcap"
+/* define what facility to use for syslog */
+#ifndef SYSLOG_FACILITY
+#define SYSLOG_FACILITY LOG_DAEMON
+#endif
+
/* set these to define the limits of the server. NOTE These are on a
per-client basis. Thus any one machine can't connect to more than
MAX_CONNECTIONS services, but any number of machines may connect at
diff --git a/source3/lib/util.c b/source3/lib/util.c
index f5cae86430..18f1240bbd 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -102,10 +102,10 @@ void setup_logging(char *pname,BOOL interactive)
char *p = strrchr(pname,'/');
if (p) pname = p+1;
#ifdef LOG_DAEMON
- openlog(pname, LOG_PID, LOG_DAEMON);
-#else /* LOG_DAEMON - for old systems that have no facility codes. */
+ openlog(pname, LOG_PID, SYSLOG_FACILITY);
+#else /* for old systems that have no facility codes. */
openlog(pname, LOG_PID);
-#endif /* LOG_DAEMON */
+#endif
}
#endif
if (interactive) {