summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-30 14:35:19 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-30 14:35:19 +0800
commitd5b5abdff83a61cd1f824556e7cd7bfddde70956 (patch)
tree4d74fa1fcb7874d563f6d9bbae47214a7f980532 /mbbsd
parentb6f9ab17f2a99c99a0667e0f455627d7c2d3967a (diff)
downloadpttbbs-d5b5abdff83a61cd1f824556e7cd7bfddde70956.tar
pttbbs-d5b5abdff83a61cd1f824556e7cd7bfddde70956.tar.gz
pttbbs-d5b5abdff83a61cd1f824556e7cd7bfddde70956.tar.bz2
pttbbs-d5b5abdff83a61cd1f824556e7cd7bfddde70956.tar.lz
pttbbs-d5b5abdff83a61cd1f824556e7cd7bfddde70956.tar.xz
pttbbs-d5b5abdff83a61cd1f824556e7cd7bfddde70956.tar.zst
pttbbs-d5b5abdff83a61cd1f824556e7cd7bfddde70956.zip
passwd delete bug
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1635 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/admin.c5
-rw-r--r--mbbsd/register.c6
-rw-r--r--mbbsd/user.c2
3 files changed, 7 insertions, 6 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index 0dfb74dc..8960d322 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -131,7 +131,7 @@ search_key_user(char *passwdfile, int mode)
if (ch == 's' && !mode) {
if ((ch = searchuser(user.userid))) {
setumoney(ch, user.money);
- passwd_update(ch, &user);
+ passwd_index_update(ch, &user);
fclose(fp1);
return 0;
} else {
@@ -149,7 +149,7 @@ search_key_user(char *passwdfile, int mode)
fprintf(stderr, "本站人口已達飽和!\n");
exit(1);
}
- if (passwd_update(allocid, &user) == -1) {
+ if (passwd_index_update(allocid, &user) == -1) {
fprintf(stderr, "客滿了,再見!\n");
exit(1);
}
@@ -1070,6 +1070,7 @@ scan_register_form(char *regfile, int automode, int neednum)
strncat(genbuf, "\n", sizeof(genbuf));
log_file(buf, genbuf, 1);
passwd_update(unum, &muser);
+ passwd_index_update(unum, &muser);
if ((fout = fopen(logfile, "a"))) {
for (n = 0; field[n]; n++)
diff --git a/mbbsd/register.c b/mbbsd/register.c
index 58694c3d..afbd3ea2 100644
--- a/mbbsd/register.c
+++ b/mbbsd/register.c
@@ -126,7 +126,7 @@ check_and_expire_account(int uid, userec_t * urec)
urec->userid[0], urec->userid);
system(genbuf);
}
- passwd_update(uid, &zerorec);
+ passwd_index_update(uid, &zerorec);
remove_from_uhash(uid - 1);
add_to_uhash(uid - 1, "");
} else {
@@ -187,7 +187,7 @@ getnewuserid()
strlcpy(zerorec.userid, str_new, sizeof(zerorec.userid));
zerorec.lastlogin = clock;
- passwd_update(i, &zerorec);
+ passwd_index_update(i, &zerorec);
setuserid(i, zerorec.userid);
passwd_unlock();
return i;
@@ -281,7 +281,7 @@ new_register()
fprintf(stderr, "本站人口已達飽和!\n");
exit(1);
}
- if (passwd_update(allocid, &newuser) == -1) {
+ if (passwd_index_update(allocid, &newuser) == -1) {
fprintf(stderr, "客滿了,再見!\n");
exit(1);
}
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 394f5a92..a0be22e3 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -194,7 +194,7 @@ violate_law(userec_t * u, int unum)
post_violatelaw(u->userid, cuser.userid, reason, "砍除 ID");
u->userid[0] = '\0';
setuserid(unum, u->userid);
- passwd_update(unum, u);
+ passwd_index_update(unum, u);
} else {
u->userlevel |= PERM_VIOLATELAW;
u->vl_count++;