When processing a "--version" request don't output the version information
to syslog.
+- Add the "enable-log-pid" option to the configure script. When enabled
+ this causes the client, server and relay programs to include the PID
+ number in syslog messages.
+ Thanks to Marius Tomaschewski for the suggestion and proto-patch.
+ [ISC-Bugs #29713]
+
Changes since 4.3.0rc1
- None
else if (fd != -1)
close(fd);
- openlog("dhclient", LOG_NDELAY, LOG_DAEMON);
+ openlog("dhclient", DHCP_LOG_OPTIONS, LOG_DAEMON);
#if !(defined(DEBUG) || defined(__CYGWIN32__))
setlogmask(LOG_UPTO(LOG_INFO));
enable_ipv4_pktinfo
enable_use_sockets
enable_secs_byteorder
+enable_log_pid
with_atf
with_srv_lease_file
with_srv6_lease_file
--enable-use-sockets use the standard BSD socket API (default is no)
--enable-secs-byteorder Correct bad byteorders in the secs field (default is
no).
+ --enable-log-pid Include PIDs in syslog messages (default is no).
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
fi
+# Include the PID in the log messages. This is useful when there may be multiple
+# instances of a program.
+# This is off by default
+# Check whether --enable-log_pid was given.
+if test "${enable_log_pid+set}" = set; then :
+ enableval=$enable_log_pid;
+fi
+
+if test "$enable_log_pid" = "yes" ; then
+
+$as_echo "#define USE_LOG_PID 1" >>confdefs.h
+
+fi
+
# Testing section
atf_path="no"
[Define to correct bad byteorders in secs field.])
fi
+# Include the PID in the log messages. This is useful when there may
+# be multiple instances of a program.
+# This is off by default
+AC_ARG_ENABLE(log_pid,
+ AS_HELP_STRING([--enable-log-pid],[Include PIDs in syslog messages (default is no).]))
+if test "$enable_log_pid" = "yes" ; then
+ AC_DEFINE([USE_LOG_PID], [1],
+ [Define to include PIDs in syslog messages.])
+fi
+
# Testing section
atf_path="no"
}
/* Initially, log errors to stderr as well as to syslogd. */
- openlog ("omshell", LOG_NDELAY, DHCPD_LOG_FACILITY);
+ openlog ("omshell", DHCP_LOG_OPTIONS, DHCPD_LOG_FACILITY);
status = dhcpctl_initialize ();
if (status != ISC_R_SUCCESS) {
fprintf (stderr, "dhcpctl_initialize: %s\n",
/* Define to include server activity tracing support. */
#undef TRACING
+/* Define to include PIDs in syslog messages. */
+#undef USE_LOG_PID
+
/* Define to 1 to use the standard BSD socket API. */
#undef USE_SOCKETS
#define MAX_TIME 0x7fffffff
#define MIN_TIME 0
+#ifdef USE_LOG_PID
+/* include the pid in the syslog messages */
+#define DHCP_LOG_OPTIONS LOG_NDELAY | LOG_PID
+#else
+#define DHCP_LOG_OPTIONS LOG_NDELAY
+#endif
/* these are referenced */
typedef struct hash_table ia_hash_t;
typedef struct hash_table iasubopt_hash_t;
else if (fd != -1)
close(fd);
- openlog("dhcrelay", LOG_NDELAY, LOG_DAEMON);
+ openlog("dhcrelay", DHCP_LOG_OPTIONS, LOG_DAEMON);
#if !defined(DEBUG)
setlogmask(LOG_UPTO(LOG_INFO));
dhcp_common_objects_setup ();
/* Initially, log errors to stderr as well as to syslogd. */
- openlog ("dhcpd", LOG_NDELAY, DHCPD_LOG_FACILITY);
+ openlog ("dhcpd", DHCP_LOG_OPTIONS, DHCPD_LOG_FACILITY);
for (i = 1; i < argc; i++) {
if (!strcmp (argv [i], "-p")) {
&global_scope, oc, MDL)) {
if (db.len == 1) {
closelog ();
- openlog("dhcpd", LOG_NDELAY, db.data[0]);
+ openlog("dhcpd", DHCP_LOG_OPTIONS, db.data[0]);
/* Log the startup banner into the new
log file. */
if (!quiet) {