diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-05-30 08:20:51 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-05-30 08:20:51 +0000 |
commit | a9145375d938c4426d115377feb3bc10d6d3feea (patch) | |
tree | 47fcde9adc617d588848454efc4b72f780443b96 /usr.sbin | |
parent | 4f081102b7647bc4d2cbd38102289bb9f93aad13 (diff) |
check mkstemp() failure
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/dhcp/dhclient/dhclient.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/dhcp/dhclient/dhclient.c b/usr.sbin/dhcp/dhclient/dhclient.c index 2dc041efef0..69b6ec08d0a 100644 --- a/usr.sbin/dhcp/dhclient/dhclient.c +++ b/usr.sbin/dhcp/dhclient/dhclient.c @@ -56,7 +56,7 @@ #ifndef lint static char copyright[] = -"$Id: dhclient.c,v 1.3 1999/02/11 22:49:59 deraadt Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: dhclient.c,v 1.4 1999/05/30 08:20:50 deraadt Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1793,6 +1793,11 @@ void script_init (ip, reason, medium) } while (fd < 0); #endif +#ifdef HAVE_MKSTEMP + if (fd == -1) + error ("can't write script file: %m"); +#endif + scriptFile = fdopen (fd, "w"); if (!scriptFile) error ("can't write script file: %m"); |