]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Sync with V3-RELEASE-BRANCH. Fixes remote root exploit.
authorMurray <source@isc.org>
Tue, 30 Apr 2002 06:18:39 +0000 (06:18 +0000)
committerMurray <source@isc.org>
Tue, 30 Apr 2002 06:18:39 +0000 (06:18 +0000)
common/print.c

index 5f0c9f9d24e02f08536b0e2ee7d5d5908912614a..ef90adedb5a584728b64e588753048c25176ae3c 100644 (file)
@@ -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 */