summaryrefslogtreecommitdiffstats
path: root/mbbsd/register.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-12 20:22:07 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-06-12 20:22:07 +0800
commit2f6959aecaaaed4980f7c8740f2fae2c8fc326ca (patch)
treed3d59847cadac9939bc0e9945530cfd1b7a5caeb /mbbsd/register.c
parentc5f8e88cde8ad8120fd5e2bdaddd2f5591502aa8 (diff)
downloadpttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.tar
pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.tar.gz
pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.tar.bz2
pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.tar.lz
pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.tar.xz
pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.tar.zst
pttbbs-2f6959aecaaaed4980f7c8740f2fae2c8fc326ca.zip
* refine cmbbs: move util_passwd.o to cmbbs/passwd.c.
* note: in order to workaround the buggy/dirty synchronization hacks, changed 'passwd_query' and 'passwd_update' to passwd_sync_*. * util/* and daemon/* use directly passwd_query/update, and mbbsd should use passwd_sync_*. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4574 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/register.c')
-rw-r--r--mbbsd/register.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mbbsd/register.c b/mbbsd/register.c
index 473f2f57..eaa85fb2 100644
--- a/mbbsd/register.c
+++ b/mbbsd/register.c
@@ -585,7 +585,7 @@ setupnewuser(const userec_t *user)
/* 不曉得為什麼要從 2 開始... Ptt:因為SYSOP在1 */
for (uid = 2; uid <= MAX_USERS; uid++) {
- passwd_query(uid, &utmp);
+ passwd_sync_query(uid, &utmp);
// tolerate for one year.
check_and_expire_account(uid, &utmp, 365*12*60);
}
@@ -611,7 +611,7 @@ setupnewuser(const userec_t *user)
SHM->money[uid - 1] = user->money;
- if (passwd_update(uid, (userec_t *)user) == -1) {
+ if (passwd_sync_update(uid, (userec_t *)user) == -1) {
passwd_unlock();
vmsg("客滿了,再見!");
exit(1);
@@ -1030,7 +1030,7 @@ check_register(void)
{
xun = atoi(buf+1);
if (xun < 0 || xun >= MAX_USERS ||
- passwd_query(xun, &u) < 0 ||
+ passwd_sync_query(xun, &u) < 0 ||
!(u.userlevel & (PERM_ACCOUNTS | PERM_ACCTREG)))
memset(&u, 0, sizeof(u));
// now u is valid only if reference is loaded with account sysop.
@@ -1532,7 +1532,7 @@ u_register(void)
toregister(email);
// update cuser
- passwd_update(usernum, &cuser);
+ passwd_sync_update(usernum, &cuser);
return FULLUPDATE;
}
@@ -1738,7 +1738,7 @@ regform_accept(const char *userid, const char *justify)
unlink(buf);
// update password file
- passwd_update(unum, &muser);
+ passwd_sync_update(unum, &muser);
// alert online users?
if (search_ulist(unum))
@@ -1777,7 +1777,7 @@ regform_reject(const char *userid, const char *reason, const RegformEntry *pre)
// handle files
// update password file
- passwd_update(unum, &muser);
+ passwd_sync_update(unum, &muser);
// alert online users?
if (search_ulist(unum))