summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-04-08 22:22:19 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-04-08 22:22:19 +0800
commit0b9a4c1c4179fe95fa86e633a46518fab9925bba (patch)
tree5f26d872ad7f2df89a774f023f071c56deb718be /mbbsd
parent3ddde73259384914a96ce3b764f311e46f9bb376 (diff)
downloadpttbbs-0b9a4c1c4179fe95fa86e633a46518fab9925bba.tar
pttbbs-0b9a4c1c4179fe95fa86e633a46518fab9925bba.tar.gz
pttbbs-0b9a4c1c4179fe95fa86e633a46518fab9925bba.tar.bz2
pttbbs-0b9a4c1c4179fe95fa86e633a46518fab9925bba.tar.lz
pttbbs-0b9a4c1c4179fe95fa86e633a46518fab9925bba.tar.xz
pttbbs-0b9a4c1c4179fe95fa86e633a46518fab9925bba.tar.zst
pttbbs-0b9a4c1c4179fe95fa86e633a46518fab9925bba.zip
reduce race condition period which lead to leave utmp record after user has been kick out.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3338 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/mbbsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 96dc8d59..f71785e8 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -951,6 +951,7 @@ setup_utmp(int mode)
#endif
getnewutmpent(&uinfo);
+ currmode = MODE_STARTED;
SHM->UTMPneedsort = 1;
// XXX 不用每 20 才檢查吧
if (!(cuser.numlogins % 20) && cuser.userlevel & PERM_BM)
@@ -1104,7 +1105,6 @@ user_login(void)
/* 初始化 uinfo、flag、mode */
setup_utmp(LOGIN);
- currmode = MODE_STARTED;
enter_uflag = cuser.uflag;
lasttime = *localtime4(&cuser.lastlogin);