summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-08-22 14:57:09 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-08-22 14:57:09 +0000
commite549f1c51dad4bb243ddfc1506bf3ea15257d869 (patch)
tree5353de09fba1cf2973c5e7097fe764a7332f2584 /pp_sys.c
parent624443052b04dc0b1338075382c138801760cca4 (diff)
downloadperl-e549f1c51dad4bb243ddfc1506bf3ea15257d869.tar.gz
Try to dodge getspnam() in AIX.
p4raw-id: //depot/perl@20842
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/pp_sys.c b/pp_sys.c
index f35bc8a6ac..04593498ab 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.
*
+ * <userpw.h> /* 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