summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-10-24 09:18:54 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-10-24 09:18:54 +0800
commitd5c46c8d63194b7d4ad83ae99ecbc06f9108c86c (patch)
tree899b5e03cc2cd7aa44e049c608d3a09d205f0e2a
parent1d2247bb393afea674213551de9ee001eeea58ad (diff)
downloadpttbbs-d5c46c8d63194b7d4ad83ae99ecbc06f9108c86c.tar
pttbbs-d5c46c8d63194b7d4ad83ae99ecbc06f9108c86c.tar.gz
pttbbs-d5c46c8d63194b7d4ad83ae99ecbc06f9108c86c.tar.bz2
pttbbs-d5c46c8d63194b7d4ad83ae99ecbc06f9108c86c.tar.lz
pttbbs-d5c46c8d63194b7d4ad83ae99ecbc06f9108c86c.tar.xz
pttbbs-d5c46c8d63194b7d4ad83ae99ecbc06f9108c86c.tar.zst
pttbbs-d5c46c8d63194b7d4ad83ae99ecbc06f9108c86c.zip
init userec_t version
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2275 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--include/pttstruct.h2
-rw-r--r--mbbsd/register.c1
-rw-r--r--util/passwdconverter.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h
index ddf78fe3..49b1e704 100644
--- a/include/pttstruct.h
+++ b/include/pttstruct.h
@@ -51,6 +51,8 @@ typedef struct chicken_t {
#define PASSLEN 14 /* Length of encrypted passwd field */
#define REGLEN 38 /* Length of registration data */
+#define PASSWD_VERSION 2275
+
typedef struct userec_t {
unsigned int version; /* version number of this sturcture, we
* use revision number of project to denote.*/
diff --git a/mbbsd/register.c b/mbbsd/register.c
index c1ff7ee9..19a3796b 100644
--- a/mbbsd/register.c
+++ b/mbbsd/register.c
@@ -251,6 +251,7 @@ new_register()
strncpy(newuser.passwd, genpasswd(passbuf), PASSLEN);
break;
}
+ newuser.version = PASSWD_VERSION;
newuser.userlevel = PERM_DEFAULT;
newuser.uflag = BRDSORT_FLAG | MOVIE_FLAG;
newuser.uflag2 = 0;
diff --git a/util/passwdconverter.c b/util/passwdconverter.c
index cd5b1fc6..85b2cf8f 100644
--- a/util/passwdconverter.c
+++ b/util/passwdconverter.c
@@ -56,7 +56,7 @@ typedef struct old_userec_t {
void transform(userec_t *new, old_userec_t *old)
{
- new->version = 2275;
+ new->version = PASSWD_VERSION;
strlcpy(new->userid, old->userid, IDLEN + 1);
strlcpy(new->realname, old->realname, 20);