summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-01 02:43:58 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-01 02:43:58 +0800
commit77e41cd138a888fa0f7c977e82b1a95092707042 (patch)
tree4212689224d7a1b9f7237842fa488bdadd5c05cf /mbbsd
parent516e5aaeddcf3bee92064c42570a67cde94ac8dc (diff)
downloadpttbbs-77e41cd138a888fa0f7c977e82b1a95092707042.tar
pttbbs-77e41cd138a888fa0f7c977e82b1a95092707042.tar.gz
pttbbs-77e41cd138a888fa0f7c977e82b1a95092707042.tar.bz2
pttbbs-77e41cd138a888fa0f7c977e82b1a95092707042.tar.lz
pttbbs-77e41cd138a888fa0f7c977e82b1a95092707042.tar.xz
pttbbs-77e41cd138a888fa0f7c977e82b1a95092707042.tar.zst
pttbbs-77e41cd138a888fa0f7c977e82b1a95092707042.zip
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1656 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/mbbsd.c1
-rw-r--r--mbbsd/passwd.c4
2 files changed, 1 insertions, 4 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 95883f86..a532f977 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -615,6 +615,7 @@ login_query()
break;
}
} else { /* guest */
+ strcpy(cuser.userid, STR_GUEST);
cuser->userlevel = 0;
cuser->uflag = COLOR_FLAG | PAGER_FLAG | BRDSORT_FLAG | MOVIE_FLAG;
mkuserdir(cuser->userid);
diff --git a/mbbsd/passwd.c b/mbbsd/passwd.c
index ec4e68ec..cd679f03 100644
--- a/mbbsd/passwd.c
+++ b/mbbsd/passwd.c
@@ -128,11 +128,7 @@ int initcuser(char *userid)
// Ptt: setup cuser and usernum here
if(userid[0]=='\0' ||
!(usernum = searchuser(userid)) || usernum > MAX_USERS)
- {
- memset(&userecbuf, 0, sizeof(userecbuf));
- strcpy(userecbuf.userid, STR_GUEST);
return -1;
- }
passwd_query(usernum, &userecbuf);
cuser = &userecbuf;
return usernum;