diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-04-08 01:13:31 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-04-08 01:13:31 +0000 |
commit | 85350a6b297d1fdc832d113428d32eb51d6a68cf (patch) | |
tree | 60eba704d9b6da304b426c6f4795a5fab2c527d8 /sbin/dhclient/dhclient.c | |
parent | fbc353ceeeb7951583c2c95d4e8e209c3253a431 (diff) |
-l can overwrite the path to the leases file, noticed by millert
Diffstat (limited to 'sbin/dhclient/dhclient.c')
-rw-r--r-- | sbin/dhclient/dhclient.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 61f231719b2..31575b88760 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.33 2004/04/07 20:18:48 henning Exp $ */ +/* $OpenBSD: dhclient.c,v 1.34 2004/04/08 01:13:30 henning Exp $ */ /* DHCP Client. */ @@ -78,7 +78,7 @@ time_t max_lease_time = 86400; /* 24 hours... */ struct tree_cache *global_options[256]; char *path_dhclient_conf = _PATH_DHCLIENT_CONF; -char *path_dhclient_db; +char *path_dhclient_db = NULL; int log_perror = 1; @@ -244,8 +244,8 @@ main(int argc, char *argv[]) error("calloc"); if (strlcpy(ifi->name, argv[0], IFNAMSIZ) >= IFNAMSIZ) error("Interface name too long"); - if (asprintf(&path_dhclient_db, "%s.%s", _PATH_DHCLIENT_DB, - ifi->name) == -1) + if (path_dhclient_db == NULL && asprintf(&path_dhclient_db, "%s.%s", + _PATH_DHCLIENT_DB, ifi->name) == -1) error("asprintf"); if (quiet) |