diff options
author | Evan Hunt <each@isc.org> | 2007-06-07 15:29:31 +0000 |
---|---|---|
committer | Evan Hunt <each@isc.org> | 2007-06-07 15:29:31 +0000 |
commit | a546f2a714b15049860d0cb60a6e8e2ea8ee7418 (patch) | |
tree | e95e9ef1a557b2fc3c86d6a3e7b5c2d1543d314d /relay | |
parent | 6d20e31bac1df71c680f19da811c14f1d5ada585 (diff) | |
download | isc-dhcp-a546f2a714b15049860d0cb60a6e8e2ea8ee7418.tar.gz |
Chdir to "/" before going into daemon mode. Use realpath() to
canonicalize relative pathnames. [rt16729]
Diffstat (limited to 'relay')
-rw-r--r-- | relay/dhcrelay.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/relay/dhcrelay.c b/relay/dhcrelay.c index d3bfbcce..96e0a97d 100644 --- a/relay/dhcrelay.c +++ b/relay/dhcrelay.c @@ -34,7 +34,7 @@ #ifndef lint static char ocopyright[] = -"$Id: dhcrelay.c,v 1.62 2007/05/19 19:16:26 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n"; +"$Id: dhcrelay.c,v 1.63 2007/06/07 15:29:31 each Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -312,6 +312,8 @@ main(int argc, char **argv) { close (1); close (2); pid = setsid (); + + chdir("/"); } /* Start dispatching packets and timeouts... */ |