diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-12 00:00:11 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-12 00:00:11 +0800 |
commit | ecfc7721f2384f60cfb158a187f53d5816dba4f5 (patch) | |
tree | d80fcf74ead296a1b0cc0be6ea47fdc31ca1524a | |
parent | e1bfbc6f3de9813347cf8f9c27d303ddb0cb0d58 (diff) | |
download | pttbbs-ecfc7721f2384f60cfb158a187f53d5816dba4f5.tar pttbbs-ecfc7721f2384f60cfb158a187f53d5816dba4f5.tar.gz pttbbs-ecfc7721f2384f60cfb158a187f53d5816dba4f5.tar.bz2 pttbbs-ecfc7721f2384f60cfb158a187f53d5816dba4f5.tar.lz pttbbs-ecfc7721f2384f60cfb158a187f53d5816dba4f5.tar.xz pttbbs-ecfc7721f2384f60cfb158a187f53d5816dba4f5.tar.zst pttbbs-ecfc7721f2384f60cfb158a187f53d5816dba4f5.zip |
* 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
-rw-r--r-- | daemon/logind/logind.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) |