From 2f6959aecaaaed4980f7c8740f2fae2c8fc326ca Mon Sep 17 00:00:00 2001
From: piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>
Date: Fri, 12 Jun 2009 12:22:07 +0000
Subject:  * refine cmbbs: move util_passwd.o to cmbbs/passwd.c.  * note: in
 order to workaround the buggy/dirty synchronization hacks, changed
 'passwd_query' and 'passwd_update' to passwd_sync_*.    * util/* and daemon/*
 use directly passwd_query/update, and mbbsd should use passwd_sync_*.

git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4574 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
---
 include/cmbbs.h | 14 +++++++++++++-
 include/proto.h | 24 ++++++++----------------
 2 files changed, 21 insertions(+), 17 deletions(-)

(limited to 'include')

diff --git a/include/cmbbs.h b/include/cmbbs.h
index 48d36ed3..7ea98e7a 100644
--- a/include/cmbbs.h
+++ b/include/cmbbs.h
@@ -51,7 +51,6 @@ extern void remove_from_uhash(int n);
 extern int  dosearchuser(const char *userid, char *rightid);
 extern int  searchuser(const char *userid, char *rightid);
 extern void setuserid(int num, const char *userid);
-extern int  getuser(const char *userid, userec_t *xuser);
 extern userinfo_t *search_ulistn(int uid, int unum);
 extern userinfo_t *search_ulist_pid(int pid);
 extern userinfo_t *search_ulist_userid(const char *userid);
@@ -81,4 +80,17 @@ extern void add_cooldowntime(int uid, int min);
 extern void add_posttimes(int uid, int times);
 # endif
 
+/* passwd */
+extern int  passwd_init  (void);
+extern void passwd_lock  (void);
+extern void passwd_unlock(void);
+extern int  passwd_update_money(int num);
+extern int  passwd_update(int num, userec_t *buf);
+extern int  passwd_query (int num, userec_t *buf);
+extern int  passwd_load_user(const char *userid, userec_t *buf);
+extern int  passwd_apply (void *data, int (*fptr)(void *, int, userec_t *));
+extern int  checkpasswd  (const char *passwd, char *test);  // test will be destroyed
+extern void logattempt   (const char *uid, char type, time4_t now, const char *fromhost);
+extern char*genpasswd    (char *pw);
+
 #endif
diff --git a/include/proto.h b/include/proto.h
index 6716aa30..66226d9d 100644
--- a/include/proto.h
+++ b/include/proto.h
@@ -115,8 +115,9 @@ unsigned int getutmpmode(void);
 void setutmpmode(unsigned int mode);
 void purge_utmp(userinfo_t *uentp);
 void getnewutmpent(const userinfo_t *up);
-int apply_ulist(int (*fptr)(const userinfo_t *));
-char *getuserid(int num);
+int  apply_ulist(int (*fptr)(const userinfo_t *));
+char*getuserid(int num);
+int  getuser(const char *userid, userec_t *xuser);
 int searchnewuser(int mode);
 int count_logins(int uid, int show);
 int is_BM_cache(int);
@@ -683,27 +684,18 @@ int RcyAddDir (const fileheader_t *fhdr, int bid, const char *direct);
 int RcyRecycleBin(void);
 
 /* passwd */
-int passwd_init(void);
-int passwd_update(int num, userec_t *buf);
-int passwd_query(int num, userec_t *buf);
-int passwd_apply(void *data, int (*fptr)(void *, int, userec_t *));
-void passwd_lock(void);
-void passwd_unlock(void);
-int passwd_update_money(int num);
+int  initcuser		(const char *userid);
 void passwd_force_update(int flag);
-int initcuser(const char *userid);
-int freecuser(void);
-int passwd_add_my_numpost(int diff); // temporary hack before new account system ready.
-char* genpasswd  (char *pw);
-int   checkpasswd(const char *passwd, char *test);  // test will be destroyed
-void  logattempt (const char *uid, char type, time4_t now, const char *fromhost);
+int  passwd_sync_update (int num, userec_t * buf);
+int  passwd_sync_query  (int num, userec_t * buf);
+
+// int  passwd_add_my_numpost(int diff); // temporary hack before new account system ready.
 
 // current user help utilities
 int pwcuSetSignature	(unsigned char newsig);
 int pwcuBitSetLevel	(unsigned int mask);
 int pwcuBitUnsetLevel	(unsigned int mask);
 
-
 /* calendar */
 int calendar(void);
 int ParseDate(const char *date, int *year, int *month, int *day);
-- 
cgit v1.2.3