version 1.1.2.2, 2012/09/18 08:44:19
|
version 1.1.2.4, 2012/09/18 13:32:48
|
Line 71 typedef int (*cb_acct_f)(void * /*current db_record*/,
|
Line 71 typedef int (*cb_acct_f)(void * /*current db_record*/,
|
|
|
|
|
struct tagUser { |
struct tagUser { |
|
int usr_fields; |
|
|
ait_val_t usr_name; |
ait_val_t usr_name; |
ait_val_t usr_pass; |
ait_val_t usr_pass; |
ait_val_t usr_uid; |
ait_val_t usr_uid; |
Line 82 struct tagUser {
|
Line 84 struct tagUser {
|
ait_val_t usr_home; |
ait_val_t usr_home; |
ait_val_t usr_shell; |
ait_val_t usr_shell; |
|
|
SLIST_ENTRY(tagCfg) usr_next; | SLIST_ENTRY(tagUser) usr_next; |
RB_ENTRY(tagCfg) usr_node; | RB_ENTRY(tagUser) usr_node; |
}; |
}; |
typedef struct tagPWD { |
typedef struct tagPWD { |
pthread_mutex_t pwd_mtx; |
pthread_mutex_t pwd_mtx; |
Line 148 void cfgUnloadPasswd(pwd_root_t * __restrict pwd);
|
Line 150 void cfgUnloadPasswd(pwd_root_t * __restrict pwd);
|
*/ |
*/ |
int cfgCreatePasswd(const char *pwdName, pwd_root_t * __restrict pwd); |
int cfgCreatePasswd(const char *pwdName, pwd_root_t * __restrict pwd); |
|
|
#if 0 |
|
/* |
/* |
* ReadPasswd() Read from file and add new item to user array | * cfgReadPasswd() - Read file and add new item at password root |
* @f = file resource | * |
* @ppwd = User array | * @f = File resource |
* return: 0 ok; -1 error:: can`t allocate memory | * @pwd = Password root |
*/ | * return: -1 error or 0 ok |
int ReadPasswd(FILE *f, passwd_t * __restrict ppwd); | */ |
| int cfgReadPasswd(FILE *f, pwd_root_t * __restrict pwd); |
/* |
/* |
* WritePasswd() Write to file from items in array | * cfgWritePasswd() - Write passwords from memory |
* @f = file resource | * |
* @ppwd = User array | * @f = File handle |
* return: 0 ok; -1 error:: can`t write to file | * @pwd = Password root |
*/ | * return: -1 error or 0 ok |
int WritePasswd(FILE *f, passwd_t * __restrict ppwd); | */ |
| int cfgWritePasswd(FILE *f, pwd_root_t * __restrict pwd); |
| |
/* |
/* |
* pwdCleanStr() Free strings in passwd_t value | * cfgConcatPasswd() - Concat two password roots into one |
* @pwd = User object | * |
* return: none | * @pwd = Password root |
*/ | * @add_pwd = Concated password root will be destroy after merge |
inline void pwdCleanStr(passwd_t __restrict pwd); | * return: -1 error or 0 ok |
| */ |
| int cfgConcatPasswd(pwd_root_t * __restrict pwd, pwd_root_t * __restrict add_pwd); |
| |
| #if 0 |
/* |
/* |
* pwdFreeValue() Free passwd_t value |
* pwdFreeValue() Free passwd_t value |
* @ppwd = User object |
* @ppwd = User object |