getdbent
static int getdbent(struct pwddb *, int, void *, struct passwd **);
if (getdbent(&sdb, _PW_KEYBYNAME, username, &tpwd))
rv = getdbent(&sdb, _PW_KEYBYNUM, &lineno, &tpwd);
if (!getdbent(&sdb, _PW_KEYBYUID, &olduid, &tpwd)) {
if (!getdbent(&sdb, _PW_KEYBYUID, &pwd.pw_uid, &tpwd))