summaryrefslogtreecommitdiffstats
path: root/mbbsd/mbbsd.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-06-30 22:33:14 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-06-30 22:33:14 +0800
commit0a34c08fb3e5c478ee3c4f3b5475df12a986deb2 (patch)
treed926e4daf6e55513ef18e242baf8d3462a1b4890 /mbbsd/mbbsd.c
parent12cabe3a7252d5f5c8267c77afd94dd802b46a5e (diff)
downloadpttbbs-0a34c08fb3e5c478ee3c4f3b5475df12a986deb2.tar
pttbbs-0a34c08fb3e5c478ee3c4f3b5475df12a986deb2.tar.gz
pttbbs-0a34c08fb3e5c478ee3c4f3b5475df12a986deb2.tar.bz2
pttbbs-0a34c08fb3e5c478ee3c4f3b5475df12a986deb2.tar.lz
pttbbs-0a34c08fb3e5c478ee3c4f3b5475df12a986deb2.tar.xz
pttbbs-0a34c08fb3e5c478ee3c4f3b5475df12a986deb2.tar.zst
pttbbs-0a34c08fb3e5c478ee3c4f3b5475df12a986deb2.zip
not using mmap for .PASSWD
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@392 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r--mbbsd/mbbsd.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 8f7605f7..2b33fc2c 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1,4 +1,4 @@
-/* $Id: mbbsd.c,v 1.35 2002/06/29 13:52:52 ptt Exp $ */
+/* $Id: mbbsd.c,v 1.36 2002/06/30 14:33:14 in2 Exp $ */
#include "bbs.h"
#define SOCKET_QLEN 4
@@ -955,6 +955,10 @@ start_client ()
signal_restart (SIGUSR2, write_request);
dup2 (0, 1);
+
+ /* mmap passwd file */
+ if (passwd_mmap ())
+ exit (1);
do_term_init ();
signal (SIGALRM, abort_bbs);
@@ -998,7 +1002,7 @@ telnet_init ()
to.tv_sec = 3;
to.tv_usec = 0;
rset=1;
- if (select (1, (fd_set *) & rset, NULL, NULL, &to) > 0)
+ if (select(1, (fd_set *) & rset, NULL, NULL, &to) > 0)
recv(0, buf, sizeof (buf),0);
}
}
@@ -1195,9 +1199,6 @@ shell_login (int argc, char *argv[], char *envp[])
setuid (BBSUID);
chdir (BBSHOME);
- /* mmap passwd file */
- if (passwd_mmap ())
- exit (1);
use_shell_login_mode = 1;
initsetproctitle (argc, argv, envp);
@@ -1260,11 +1261,6 @@ daemon_login (int argc, char *argv[], char *envp[])
setuid(BBSUID);
chdir(BBSHOME);
- /* mmap passwd file */
- if(passwd_mmap())
- {
- exit(1);
- }
sprintf(buf, "run/mbbsd.%d.pid", listen_port);
if((fp = fopen(buf, "w"))) {
fprintf(fp, "%d\n", getpid());