+2005-03-25 Ken Raeburn <raeburn@mit.edu>
+
+ * kuserok.c (krb5_kuserok): Use k5_getpwnam_r.
+
2005-03-22 Tom Yu <tlyu@mit.edu>
* dnsglue.h: Define ns_rr_class to ns_rr_cl if ns_rr_class doesn't
int gobble;
/* no account => no access */
-#ifdef HAVE_GETPWNAM_R
char pwbuf[BUFSIZ];
struct passwd pwx;
-#if !defined(GETPWNAM_R_4_ARGS)
- /* POSIX */
- if (getpwnam_r(luser, &pwx, pwbuf, sizeof(pwbuf), &pwd) != 0)
- pwd = NULL;
-#else
- /* draft POSIX */
- pwd = getpwnam_r(luser, &pwx, pwbuf, sizeof(pwbuf));
-#endif
-#else
- pwd = getpwnam(luser);
-#endif
- if (pwd == NULL)
+ if (k5_getpwnam_r(luser, &pwx, pwbuf, sizeof(pwbuf), &pwd) != 0)
return(FALSE);
(void) strncpy(pbuf, pwd->pw_dir, sizeof(pbuf) - 1);
pbuf[sizeof(pbuf) - 1] = '\0';