diff --git a/klogd.c b/klogd.c index 8856737..90856b6 100644 --- a/klogd.c +++ b/klogd.c @@ -864,6 +864,7 @@ int main(argc, argv) auto char *log_level = (char *) 0, *output = (char *) 0; + chdir ("/"); /* Parse the command-line. */ while ((ch = getopt(argc, argv, "c:df:iIk:nopsvx")) != EOF) switch((char)ch) diff --git a/syslogd.c b/syslogd.c index fa950b7..efdfd3c 100644 --- a/syslogd.c +++ b/syslogd.c @@ -681,6 +681,7 @@ int main(argc, argv) extern int optind; extern char *optarg; + chdir ("/"); while ((ch = getopt(argc, argv, "dhf:l:m:np:rs:v")) != EOF) switch((char)ch) { case 'd': /* debug */