]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Fix pasto - filename -> server_name.
authorTed Lemon <source@isc.org>
Mon, 24 Jan 2000 14:57:25 +0000 (14:57 +0000)
committerTed Lemon <source@isc.org>
Mon, 24 Jan 2000 14:57:25 +0000 (14:57 +0000)
client/dhclient.c

index ea9311fa04d033a082f3b2127508bb14bc877fd0..9e5c3837a635d82c25a8322606fcc5e271812430 100644 (file)
@@ -56,7 +56,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhclient.c,v 1.44.2.41 1999/11/12 21:01:16 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: dhclient.c,v 1.44.2.42 2000/01/24 14:57:25 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -1848,7 +1848,7 @@ void write_client_lease (ip, lease, rewrite)
                         lease -> filename);
        if (lease -> server_name)
                fprintf (leaseFile, "  server-name \"%s\";\n",
-                        lease -> filename);
+                        lease -> server-name);
        if (lease -> medium)
                fprintf (leaseFile, "  medium \"%s\";\n",
                         lease -> medium -> string);
@@ -1911,8 +1911,8 @@ void script_init (ip, reason, medium)
                if (!mktemp (scriptName))
                        error ("can't create temporary client script %s: %m",
                               scriptName);
-               fd = creat (scriptName, 0600);
-       } while (fd < 0 && errno == EEXISTS);
+               fd = open (scriptName, O_EXCL | O_CREAT | O_WRONLY, 0600);
+       } while (fd < 0 && errno == EEXIST);
 #endif
        if (fd < 0)
                log_fatal ("can't create temporary script %s: %m", scriptName);