From 0e9ab5fb5e47840bce8f79ee1531370cd16de0dc Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 19 Aug 2018 12:29:03 +0000 Subject: [PATCH] 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@ --- sbin/slaacd/slaacd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"); -- 2.20.1