From: Roy Marples Date: Wed, 6 Dec 2006 11:34:46 +0000 (+0000) Subject: Fix yp.conf creation X-Git-Tag: v3.2.3~350 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94fdb30903a58d6b6286b494eb77454b3ec2a052;p=thirdparty%2Fdhcpcd.git Fix yp.conf creation --- diff --git a/ChangeLog b/ChangeLog index 0e6415bd..8ee7ecee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +dhcpcd-3.0.5 +Fix yp.conf creation. + dhcpcd-3.0.4 Fix netmask thanks to Marc Duponcheel. Send the hostname by default unless null, (none) or localhost. diff --git a/Makefile b/Makefile index 4322d0ac..069e9ac0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Should work for both GNU make and BSD mke -VERSION = 3.0.4 +VERSION = 3.0.5 INSTALL ?= install CFLAGS ?= -Wall -O2 -pedantic -std=gnu99 diff --git a/configure.c b/configure.c index 478c029d..14a4132a 100644 --- a/configure.c +++ b/configure.c @@ -230,10 +230,10 @@ static int make_nis (char *ifname, dhcp_t *dhcp) fprintf (f, "domain %s broadcast\n", dhcp->nisdomain); } else - sprintf(prefix, "ypserver %c", '\0'); + snprintf (prefix, sizeof (prefix), "%s", "ypserver"); for (address = dhcp->nisservers; address; address = address->next) - fprintf (f, "%s%s\n", prefix, inet_ntoa (address->address)); + fprintf (f, "%s %s\n", prefix, inet_ntoa (address->address)); fclose (f);