From: florian Date: Sun, 19 Aug 2018 12:29:03 +0000 (+0000) Subject: Call daemon with 0 as first argument so that it changes the cwd to / X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0e9ab5fb5e47840bce8f79ee1531370cd16de0dc;p=openbsd Call daemon with 0 as first argument so that it changes the cwd to / otherwise the main process will keep sitting in the directory from where slaacd was started which might for example prevent an unmount. Problem first observed by dlg in ntpd(8). Discussed with deraadt@ --- diff --git a/sbin/slaacd/slaacd.c b/sbin/slaacd/slaacd.c index c2d016d4c7a..86c5256221e 100644 --- a/sbin/slaacd/slaacd.c +++ b/sbin/slaacd/slaacd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: slaacd.c,v 1.30 2018/08/05 09:37:52 mestre Exp $ */ +/* $OpenBSD: slaacd.c,v 1.31 2018/08/19 12:29:03 florian Exp $ */ /* * Copyright (c) 2017 Florian Obser @@ -181,7 +181,7 @@ main(int argc, char *argv[]) log_setverbose(verbose); if (!debug) - daemon(1, 0); + daemon(0, 0); log_info("startup");