From: Mark Andrews Date: Tue, 20 Apr 2004 06:53:52 +0000 (+0000) Subject: 1616. [compat] Ensure that named's version is visible in the core X-Git-Tag: v9.2.3rc4^3~50 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b0cab2b6bf4c6b3b0b549a07d447a27e705e4ff1;p=thirdparty%2Fbind9.git 1616. [compat] Ensure that named's version is visible in the core dump. [RT #11127] --- diff --git a/bin/named/main.c b/bin/named/main.c index 6804ff03235..ef0aa939790 100644 --- a/bin/named/main.c +++ b/bin/named/main.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: main.c,v 1.136 2004/03/16 05:52:14 marka Exp $ */ +/* $Id: main.c,v 1.137 2004/04/20 06:53:52 marka Exp $ */ #include @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -70,7 +71,8 @@ static isc_boolean_t want_stats = ISC_FALSE; static char program_name[ISC_DIR_NAMEMAX] = "named"; static char absolute_conffile[ISC_DIR_PATHMAX]; -static char saved_command_line[512]; +static char saved_command_line[512]; +static char version[512]; void ns_main_earlywarning(const char *format, ...) { @@ -684,6 +686,17 @@ int main(int argc, char *argv[]) { isc_result_t result; + /* + * Record version in core image. + * strings named.core | grep "named version:" + */ + strlcat(version, +#ifdef __DATE__ + "named version: BIND " VERSION " (" __DATE__ ")", +#else + "named version: BIND " VERSION, +#endif + sizeof(version)); result = isc_file_progname(*argv, program_name, sizeof(program_name)); if (result != ISC_R_SUCCESS) ns_main_earlyfatal("program name too long");