Date: Sun, 30 Mar 2003 18:06:20 -0600 From: David Leimbach <leimy2k@mac.com> To: freebsd-standards@freebsd.org Subject: implementation of getpwnam_r Message-ID: <99FC4F88-630C-11D7-8739-0003937E39E0@mac.com>
next in thread | raw e-mail | index | archive | help
It seems this already exists in src/contrib/bind/lib/getpwent_r.c int getpwnam_r(const char * login, struct passwd *pwptr, char * buf, size_t buflen, struct passwd ** result) { struct passwd *pw = getpwnam(login); int res; if (pw == NULL) { *result = NULL; return (0); } res = copy_passwd(pw,pwptr,buf,buflen); *result = res ? NULL : pwptr; return (res); } Is this sufficient? copy_passwd is also in the bind library? Should this be in several places like this? Am I done? :) Dave
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99FC4F88-630C-11D7-8739-0003937E39E0>