summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/Makefile4
-rw-r--r--util/bbsmail.c2
-rw-r--r--util/chkhbf.c2
-rw-r--r--util/toplazyBM.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/util/Makefile b/util/Makefile
index 0bbfc0bd..f6f9fb99 100644
--- a/util/Makefile
+++ b/util/Makefile
@@ -7,9 +7,9 @@ CFLAGS+= -DPTTBBS_UTIL
BBSBASE= $(SRCROOT)/include/var.h
-UTIL_OBJS= util_passwd.o util_var.o
+UTIL_OBJS= util_var.o
-MBBSD_OBJS= record passwd var
+MBBSD_OBJS= record var
# 下面這些程式, 會被 compile 並且和 $(UTIL_OBJS) 聯結
CPROG_WITH_UTIL= \
diff --git a/util/bbsmail.c b/util/bbsmail.c
index fa14b493..c2cc732d 100644
--- a/util/bbsmail.c
+++ b/util/bbsmail.c
@@ -52,7 +52,7 @@ int mail2bbs(char *userid)
userec_t xuser;
/* check if the userid is in our bbs now */
- if( !(uid = getuser(userid, &xuser)) ){
+ if( (uid = passwd_load_user(userid, &xuser)) < 1 ){
sprintf(genbuf, "BBS user <%s> not existed", userid);
puts(genbuf);
mailog(genbuf);
diff --git a/util/chkhbf.c b/util/chkhbf.c
index 90c28d56..3574fe1a 100644
--- a/util/chkhbf.c
+++ b/util/chkhbf.c
@@ -94,7 +94,7 @@ void chkhbf(boardheader_t *bptr)
chkuser[i] = 0;
break;
}
- if( !getuser(chkuser, &xuser) || strcmp(chkuser, "guest") == 0 ){
+ if( passwd_load_user(chkuser, &xuser) < 1 || strcasecmp(chkuser, STR_GUEST) == 0 ){
strcpy(explist[nEXP].userid, chkuser);
explist[nEXP].expire = -1;
++nEXP;
diff --git a/util/toplazyBM.c b/util/toplazyBM.c
index b9a66c26..e2bc0a6b 100644
--- a/util/toplazyBM.c
+++ b/util/toplazyBM.c
@@ -86,12 +86,12 @@ int main(int argc, char *argv[])
p = strtok(p,"/ ]");
for(index=0; p && index<5; index++) {
int diff;
- if(!p[0]) {
+ // XXX what if bmid is invalid?
+ if(!p[0] || (bmid = passwd_load_user(p, &xuser)) < 1) {
index--;
p=strtok(NULL,"/ ]");
continue;
}
- bmid=getuser(p, &xuser);
strlcpy(bms[index].bmname, p, sizeof(bms[index].bmname));
bms[index].flag = 0;