--- libaitcfg/src/pq.c 2012/09/19 11:47:39 1.1.2.2 +++ libaitcfg/src/pq.c 2012/09/19 12:07:23 1.1.2.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: pq.c,v 1.1.2.2 2012/09/19 11:47:39 misho Exp $ +* $Id: pq.c,v 1.1.2.4 2012/09/19 12:07:23 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -61,7 +61,7 @@ _selectPasswd(pwd_root_t * __restrict pwd, u_int uid, return RB_FIND(tagPWD, pwd, &fu); } - return cfg_findPasswdBy(pwd, PWD_CRIT_UID, uid); + return (struct tagUser*) cfg_findPasswdBy(pwd, PWD_CRIT_UID, uid); } /* --------------------------------------------------------------- */ @@ -74,7 +74,7 @@ _selectPasswd(pwd_root_t * __restrict pwd, u_int uid, * @arg1 = Username | UID | GID * return: NULL not found item or error and !=NULL found item */ -struct tagUser * +const struct tagUser * cfg_findPasswdBy(pwd_root_t * __restrict pwd, int criteria, ...) { struct tagUser *u; @@ -107,13 +107,13 @@ cfg_findPasswdBy(pwd_root_t * __restrict pwd, int crit } break; case PWD_CRIT_UID: - if (AIT_GET_U32(&u->usr_uid) == AIT_GET_U32(&v)) { + if (AIT_GET_LIKE(&u->usr_uid, u_int) == AIT_GET_U32(&v)) { AIT_FREE_VAL(&v); return u; } break; case PWD_CRIT_GID: - if (AIT_GET_U32(&u->usr_gid) == AIT_GET_U32(&v)) { + if (AIT_GET_LIKE(&u->usr_gid, u_int) == AIT_GET_U32(&v)) { AIT_FREE_VAL(&v); return u; }