summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2018-01-12 10:41:37 -0500
committerThomas Markwalder <tmark@isc.org>2018-01-12 10:41:37 -0500
commitdb4e4aa2e429a070f30c5795300a77312144bc8f (patch)
treee8ba1c2a2baa518a9573069b821a03a45fd13b29 /client
parentd394b602d43f24cd96fff3fbfb0c7b386b352cca (diff)
downloadisc-dhcp-db4e4aa2e429a070f30c5795300a77312144bc8f.tar.gz
[master] Fixed relative file name crash
Merges in rt46957
Diffstat (limited to 'client')
-rw-r--r--client/dhclient.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/client/dhclient.c b/client/dhclient.c
index ac3cdbf8..825ab00f 100644
--- a/client/dhclient.c
+++ b/client/dhclient.c
@@ -639,17 +639,11 @@ main(int argc, char **argv) {
* to be reopened after chdir() has been called
*/
if (path_dhclient_db[0] != '/') {
- const char *old_path = path_dhclient_db;
- path_dhclient_db = realpath(path_dhclient_db, NULL);
- if (path_dhclient_db == NULL)
- log_fatal("Failed to get realpath for %s: %s", old_path, strerror(errno));
+ path_dhclient_db = absolute_path(path_dhclient_db);
}
if (path_dhclient_script[0] != '/') {
- const char *old_path = path_dhclient_script;
- path_dhclient_script = realpath(path_dhclient_script, NULL);
- if (path_dhclient_script == NULL)
- log_fatal("Failed to get realpath for %s: %s", old_path, strerror(errno));
+ path_dhclient_script = absolute_path(path_dhclient_script);
}
/*