From: Murray Date: Tue, 30 Apr 2002 06:18:39 +0000 (+0000) Subject: Sync with V3-RELEASE-BRANCH. Fixes remote root exploit. X-Git-Tag: HEAD-MERGE-V3-0-3B1~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=668c33c74a4361ec2b73583ee8639cae7a1f7dc1;p=thirdparty%2Fdhcp.git Sync with V3-RELEASE-BRANCH. Fixes remote root exploit. --- diff --git a/common/print.c b/common/print.c index 5f0c9f9d2..ef90adedb 100644 --- a/common/print.c +++ b/common/print.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: print.c,v 1.55 2001/08/10 10:49:01 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; +"$Id: print.c,v 1.56 2002/04/30 06:18:39 murray Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1197,6 +1197,14 @@ void print_dns_status (int status, ns_updque *uq) } predicate = "and"; } + if (u -> r_dname) { + if (s + 1 < end) + *s++ = ' '; + if (s + strlen (u -> r_dname) < end) { + strcpy (s, u -> r_dname); + s += strlen (s); + } + } if (ttlp) { if (s + 1 < end) *s++ = ' '; @@ -1253,14 +1261,6 @@ void print_dns_status (int status, ns_updque *uq) strcpy (s, en); s += strlen (en); } - if (u -> r_dname) { - if (s + 1 < end) - *s++ = ' '; - if (s + strlen (u -> r_dname) < end) { - strcpy (s, u -> r_dname); - s += strlen (s); - } - } if (u -> r_data) { if (s + 1 < end) *s++ = ' '; @@ -1366,8 +1366,8 @@ void print_dns_status (int status, ns_updque *uq) *s++ = '.'; *s++ = 0; if (errorp) - log_error (obuf); + log_error ("%s", obuf); else - log_info (obuf); + log_info ("%s", obuf); } #endif /* NSUPDATE */