--- libaitcfg/inc/aitpwd.h 2012/09/19 11:53:52 1.1.2.7 +++ libaitcfg/inc/aitpwd.h 2012/09/19 13:02:58 1.1.2.10 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitpwd.h,v 1.1.2.7 2012/09/19 11:53:52 misho Exp $ +* $Id: aitpwd.h,v 1.1.2.10 2012/09/19 13:02:58 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -200,7 +200,7 @@ int cfgAuthPasswd(pwd_root_t * __restrict pwd, const c * @arg1 = Username | UID | GID * return: NULL not found item or error and !=NULL found item */ -struct tagUser *cfg_findPasswdBy(pwd_root_t * __restrict pwd, int criteria, ...); +const struct tagUser *cfg_findPasswdBy(pwd_root_t * __restrict pwd, int criteria, ...); /* * cfg_unsetPasswd() - Unset item from passwords and free resources * @@ -214,22 +214,20 @@ int cfg_unsetPasswd(pwd_root_t * __restrict pwd, int c * cfg_setPasswd() - Set item in password or adding new item if not exists * * @cfg = Password root + * @fields = Meaning continuous field * @csName = Username - * @csPass = Password - * @uid = UID - * @gid = GID - * @Class = Login class - * @change = Chage date - * @expire = Expire date - * @csRealm = Realm - * @csHome = Home dir - * @csShell = Shell + * @arg1 = Password + * @arg2 = UID + * @arg3 = GID + * @arg4 = Login class + * @arg5 = Chage date + * @arg6 = Expire date + * @arg7 = Realm + * @arg8 = Home dir + * @arg9 = Shell * return: 0 nothing changed, -1 error, 1 found and updated item or 2 added new item */ -int cfg_setPasswd(pwd_root_t * __restrict pwd, const char *csName, const char *csPass, - unsigned int uid, unsigned int gid, const char *csClass, - unsigned int change, unsigned int expire, const char *csRealm, - const char *csHome, const char *csShell); +int cfg_setPasswd(pwd_root_t * __restrict pwd, u_char fields, const char *csName, ...); /* * cfg_getPasswd() - Get item from passwords and return structure from it *