Your message dated Sat, 5 Sep 2015 15:34:38 -0400 with message-id <[email protected]> and subject line Re: Bug#62547: bind: Always does openlod("named", ...) and doesn't use the process name. has caused the Debian Bug report #62547, regarding bind: Always does openlod("named", ...) and doesn't use the process name. to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 62547: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=62547 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: bind Version: 1:8.2.2p5-11 Severity: wishlist The following patch to named causes it to use the basename of argv[0] for the parameter of openlog() instead of the hard-coded string "named". This change is very useful for a machine where you have several copies of bind running on different interfaces with different configurations (one machine I manage has four copies of named running). With this patch you'll be able to easily determine from the log files which instance of the named daemon had the error. Could you please apply this to the Debian package AND send it upstream to the ISC (I figure that my code will have more chance of inclusion by the ISC if it's been reviewed by you first). Russell Coker diff -ru bind-8.2.2p5.old/src/bin/named/ns_main.c bind-8.2.2p5/src/bin/named/ns_main.c --- bind-8.2.2p5.old/src/bin/named/ns_main.c Tue Nov 9 00:01:38 1999 +++ bind-8.2.2p5/src/bin/named/ns_main.c Mon Apr 17 15:31:50 2000 @@ -227,6 +227,8 @@ int ch; struct passwd *pw; struct group *gr; + char *ident = strdup(argv[0]); + int i; #ifdef _AUX_SOURCE set42sig(); @@ -437,10 +439,20 @@ #if defined(LOG_CONS) && defined(USE_LOG_CONS) n |= LOG_CONS; #endif + for(i = 0; ident[i] != '\0'; i++) + { + if(ident[i] == '/') + { + ident = &ident[i + 1]; + i = 0; + } + } + if(ident[0] == '\0') + ident = "named"; #ifdef SYSLOG_42BSD - openlog("named", n); + openlog(ident, n); #else - openlog("named", n, LOG_DAEMON); + openlog(ident, n, LOG_DAEMON); #endif init_logging(); -- System Information Debian Release: 2.2 Kernel Version: Linux lyta 2.2.14 #1 Fri Mar 3 18:17:51 CET 2000 i686 unknown Versions of the packages bind depends on: ii libc6 2.1.3-8 GNU C Library: Shared libraries and Timezone ii netbase 3.18-2 Basic TCP/IP networking binaries --- Begin /etc/init.d/bind (modified conffile) #!/bin/sh test -x /usr/sbin/named || exit 0 case "$1" in start) echo -n "Starting domain name service: named" start-stop-daemon --start --quiet --exec /usr/bin/sudo -- -u named /usr/bin/authbind /usr/sbin/named /etc/bind/named.conf echo "." ;; stop) echo -n "Stopping domain name service: named" start-stop-daemon --stop --quiet \ --pidfile /var/run/named.pid --exec /usr/sbin/named echo "." ;; restart) $0 stop $0 start ;; reload) echo -n "Reloading named configuration..." start-stop-daemon --stop --signal 1 --quiet \ --pidfile /var/run/named.pid --exec /usr/sbin/named echo "done." ;; force-reload) $0 restart ;; *) echo "Usage: /etc/init.d/bind {start|stop|reload|restart|force-reload}" >&2 exit 1 ;; esac exit 0 --- End /etc/init.d/bind --- Begin /etc/bind/named.conf (modified conffile) // This is the primary configuration file for the BIND DNS server named. // // Please read /usr/doc/bind/README.Debian for information on the structure // of BIND configuration files in Debian for BIND versions 8.2.1 and later, // *BEFORE* you customize this configuration file. // options { directory "/etc/bind"; /* * If there is a firewall between you and nameservers you want * to talk to, you might need to uncomment the query-source * directive below. Previous versions of BIND always asked * questions using port 53, but BIND 8.1 and later use an unprivileged * port by default. */ // query-source address * port 53; }; // reduce log verbosity on issues outside our control logging { category lame-servers { null; }; category cname { null; }; }; // prime the server with knowledge of the root servers zone "." { type hint; file "/etc/bind/db.root"; }; // be authoritative for the localhost forward and reverse zones zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127.0.0"; }; // add entries for other zones below here zone "coker.com.au" { type slave; file "backup/coker.com.au"; masters { 203.36.46.1; }; }; zone "24hourstest1.nl" { type slave; file "backup/24hourstest1.nl"; masters { 212.189.190.8; }; }; zone "46.36.203.in-addr.arpa" { type slave; file "backup/203.36.46"; masters { 203.36.46.1; }; }; zone "168.192.in-addr.arpa" { type master; file "rev/192.168"; }; --- End /etc/bind/named.conf
--- End Message ---
--- Begin Message ---[email protected] wrote: > The following patch to named causes it to use the basename of argv[0] for the > parameter of openlog() instead of the hard-coded string "named". This change > is very useful for a machine where you have several copies of bind running on > different interfaces with different configurations (one machine I manage has > four copies of named running). With this patch you'll be able to easily > determine from the log files which instance of the named daemon had the > error. > Could you please apply this to the Debian package AND send it upstream to the > ISC (I figure that my code will have more chance of inclusion by the ISC if > it's been reviewed by you first). Hi, Russell: Since this bug was filed, BIND9 has replaced BIND8 in the Debian archive. I've reviewed the source code and the runtime behavior of the current bind9 package and the named binary in fact now behaves in the way you requested, so I'm closing this bug. -- Robert Edmonds [email protected]
--- End Message ---

