diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-08-29 21:05:40 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-08-29 21:05:40 +0800 |
commit | f9055a6efb4fd0ce685bf3753da124cd01d1b99d (patch) | |
tree | d5387f43a428b94a94940cfab17379fd8e89f388 | |
parent | b6cca7a4526e80ad9061c8c76d197a40a2fbfa79 (diff) | |
download | pttbbs-f9055a6efb4fd0ce685bf3753da124cd01d1b99d.tar pttbbs-f9055a6efb4fd0ce685bf3753da124cd01d1b99d.tar.gz pttbbs-f9055a6efb4fd0ce685bf3753da124cd01d1b99d.tar.bz2 pttbbs-f9055a6efb4fd0ce685bf3753da124cd01d1b99d.tar.lz pttbbs-f9055a6efb4fd0ce685bf3753da124cd01d1b99d.tar.xz pttbbs-f9055a6efb4fd0ce685bf3753da124cd01d1b99d.tar.zst pttbbs-f9055a6efb4fd0ce685bf3753da124cd01d1b99d.zip |
* we don't support ver r2275 (chick) password anymore (too old).
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4787 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/admin.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c index cab1089f..75620f38 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -89,13 +89,18 @@ static int retrieve_backup(userec_t *user) return -1; } -void +int upgrade_passwd(userec_t *puser) { if (puser->version == PASSWD_VERSION) - return; + return 1; if (!puser->userid[0]) - return; + return 1; + // unknown version + return 0; + +#if 0 + // this is a sample. if (puser->version == 2275) // chicken change { memset(puser->career, 0, sizeof(puser->career)); @@ -103,8 +108,10 @@ upgrade_passwd(userec_t *puser) memset(puser->chkpad0, 0, sizeof(puser->chkpad0)); memset(puser->chkpad1, 0, sizeof(puser->chkpad1)); memset(puser->chkpad2, 0, sizeof(puser->chkpad2)); + puser->lastseen= 0; puser->version = PASSWD_VERSION; return; +#endif } } @@ -159,7 +166,8 @@ search_key_user(const char *passwdfile, int mode) } // XXX 這裡會取舊資料,要小心 PWD 的 upgrade - upgrade_passwd(&user); + if (!upgrade_passwd(&user)) + continue; keymatch = NULL; |