From ecfc7721f2384f60cfb158a187f53d5816dba4f5 Mon Sep 17 00:00:00 2001 From: piaip Date: Thu, 11 Jun 2009 16:00:11 +0000 Subject: * fix: some API/logs (eg, incorrect password attempts) require cwd=BBSHOME git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4564 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- daemon/logind/logind.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/daemon/logind/logind.c b/daemon/logind/logind.c index 6f159fb5..d4148056 100644 --- a/daemon/logind/logind.c +++ b/daemon/logind/logind.c @@ -1397,6 +1397,11 @@ main(int argc, char *argv[]) { fprintf(stderr, LOG_PREFIX "start daemonize\r\n"); daemonize(BBSHOME "/run/logind.pid", log_file); + + // because many of the libraries used in this daemon (for example, + // passwd / logging / ...) all assume cwd=BBSHOME, + // let's workaround them. + // chdir(BBSHOME); } // Some event notification mechanisms don't work across forks (e.g. kqueue) -- cgit v1.2.3