From: Ted Lemon Date: Thu, 13 Apr 2000 21:41:34 +0000 (+0000) Subject: Log an error and quit if we can't append to the DHCP lease database. X-Git-Tag: V3-BETA-2-PATCH-1~250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c66a31b2601516d300e810f3f4e2ffc09179a1ea;p=thirdparty%2Fdhcp.git Log an error and quit if we can't append to the DHCP lease database. --- diff --git a/server/db.c b/server/db.c index 7c192e728..e7ecebbb4 100644 --- a/server/db.c +++ b/server/db.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: db.c,v 1.46 2000/04/04 06:28:52 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: db.c,v 1.47 2000/04/13 21:41:34 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -607,6 +607,8 @@ void db_startup (testp) if (!testp) { db_file = fopen (path_dhcpd_db, "a"); + if (!db_file) + log_fatal ("Can't open %s for append.", path_dhcpd_db); expire_all_pools (); GET_TIME (&write_time); new_lease_file ();