diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-05-29 10:44:44 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-05-29 10:44:44 +0000 |
commit | f1066039eba92a2bb4d8de3ef991b7c813b020c9 (patch) | |
tree | 21d6aed35d87967fa424c04bd71867ae33ef2bb6 /pp_sys.c | |
parent | 18bb47038c875d1c8e166d8a88f9ce1ece59f0e7 (diff) | |
download | perl-f1066039eba92a2bb4d8de3ef991b7c813b020c9.tar.gz |
Make Configure support the change #3367,
SysV shadow passwords.
p4raw-link: @3367 on //depot/perl: 8c0bfa080e85353d7675b8b2fb1a04c6cc60cd5f
p4raw-id: //depot/cfgperl@3502
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -17,8 +17,10 @@ #include "EXTERN.h" #include "perl.h" -#ifdef HAS_GETSPENT -/* Shadow password support for solaris - pdo@cs.umd.edu*/ +#ifdef I_SHADOW +/* Shadow password support for solaris - pdo@cs.umd.edu + * Not just Solaris: at least HP-UX, IRIX, Linux. + * the API is from SysV. --jhi */ #include <shadow.h> #endif @@ -4564,11 +4566,13 @@ PP(pp_gpwent) else pwent = (struct passwd *)getpwent(); -#ifdef HAS_GETSPENT +#ifdef HAS_GETSPNAM if (which == OP_GPWNAM) spwent = getspnam(pwent->pw_name); +# ifdef HAS_GETSPUID /* AFAIK there isn't any anywhere. --jhi */ else if (which == OP_GPWUID) spwent = getspnam(pwent->pw_name); +# endif else spwent = (struct spwd *)getspent(); #endif @@ -4591,14 +4595,14 @@ PP(pp_gpwent) PUSHs(sv = sv_mortalcopy(&PL_sv_no)); #ifdef PWPASSWD -#ifdef HAS_GETSPENT +# ifdef HAS_GETSPENT if (spwent) sv_setpv(sv, spwent->sp_pwdp); else sv_setpv(sv, pwent->pw_passwd); -#else +# else sv_setpv(sv, pwent->pw_passwd); -#endif +# endif #endif PUSHs(sv = sv_mortalcopy(&PL_sv_no)); @@ -4662,9 +4666,9 @@ PP(pp_spwent) djSP; #if defined(HAS_PASSWD) && defined(HAS_SETPWENT) && !defined(CYGWIN32) setpwent(); -#ifdef HAS_GETSPENT +# ifdef HAS_SETSPENT setspent(); -#endif +# endif RETPUSHYES; #else DIE(PL_no_func, "setpwent"); @@ -4676,9 +4680,9 @@ PP(pp_epwent) djSP; #if defined(HAS_PASSWD) && defined(HAS_ENDPWENT) endpwent(); -#ifdef HAS_GETSPENT +# ifdef HAS_ENDSPENT endspent(); -#endif +# endif RETPUSHYES; #else DIE(PL_no_func, "endpwent"); |