summaryrefslogtreecommitdiff
path: root/common/print.c
diff options
context:
space:
mode:
authorMurray <source@isc.org>2002-04-30 06:18:39 +0000
committerMurray <source@isc.org>2002-04-30 06:18:39 +0000
commit668c33c74a4361ec2b73583ee8639cae7a1f7dc1 (patch)
tree9e91bbfe805d79b16a2501dc9b58a20ee74e8216 /common/print.c
parent09636c655075ccd6d71fa2e8ec518963c1b6ee2b (diff)
downloadisc-dhcp-668c33c74a4361ec2b73583ee8639cae7a1f7dc1.tar.gz
Sync with V3-RELEASE-BRANCH. Fixes remote root exploit.
Diffstat (limited to 'common/print.c')
-rw-r--r--common/print.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/common/print.c b/common/print.c
index 5f0c9f9d..ef90aded 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 */