From: Jarkko Hietaniemi Date: Fri, 22 Aug 2003 14:57:09 +0000 (+0000) Subject: Try to dodge getspnam() in AIX. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e549f1c51dad4bb243ddfc1506bf3ea15257d869;p=p5sagit%2Fp5-mst-13.2.git Try to dodge getspnam() in AIX. p4raw-id: //depot/perl@20842 --- diff --git a/pp_sys.c b/pp_sys.c index f35bc8a..0459349 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -5161,7 +5161,7 @@ PP(pp_gpwent) * AIX getpwnam() is clever enough to return the encrypted password * only if the caller (euid?) is root. * - * There are at least two other shadow password APIs. Many platforms + * There are at least three other shadow password APIs. Many platforms * seem to contain more than one interface for accessing the shadow * password databases, possibly for compatibility reasons. * The getsp*() is by far he simplest one, the other two interfaces @@ -5183,6 +5183,12 @@ PP(pp_gpwent) * char *(getespw*(...).ufld.fd_encrypt) * Mention HAS_GETESPWNAM here so that Configure probes for it. * + * /* AIX */ + * struct userpw *getuserpw(); + * The password is in + * char *(getuserpw(...)).spw_upw_passwd + * (but the de facto standard getpwnam() should work okay) + * * Mention I_PROT here so that Configure probes for it. * * In HP-UX for getprpw*() the manual page claims that one should include @@ -5268,7 +5274,9 @@ PP(pp_gpwent) * Divert the urge to writing an extension instead. * * --jhi */ -# ifdef HAS_GETSPNAM + /* Some AIX setups falsely(?) detect some getspnam(), which + * has a different API than the Solaris/IRIX one. */ +# if defined(HAS_GETSPNAM) && !defined(_AIX) { struct spwd *spwent; int saverrno; /* Save and restore errno so that