summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-12 00:00:11 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-12 00:00:11 +0800
commita1318a58af497bc09b3480c06e3cea2fd56baa6f (patch)
treeed4e8dfd8540d332b3a5d106d72c1d3229821986
parentea1052be621ff3ce53331e6a258d016aa5ba2cc7 (diff)
downloadpttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.tar
pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.tar.gz
pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.tar.bz2
pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.tar.lz
pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.tar.xz
pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.tar.zst
pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.zip
* fix: some API/logs (eg, incorrect password attempts) require cwd=BBSHOME
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4564 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/daemon/logind/logind.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pttbbs/daemon/logind/logind.c b/pttbbs/daemon/logind/logind.c
index 6f159fb5..d4148056 100644
--- a/pttbbs/daemon/logind/logind.c
+++ b/pttbbs/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)