Testing of recent commits
Darren Tucker
dtucker at zip.com.au
Fri Nov 21 15:01:14 EST 2003
Ben Lindstrom wrote:
> I could have swore I was told it was not required, but I don't have
> HP/UX. And my initial check in comments actually elude to HP/UX
> maybe problematic.
That was just a typo, fixed in rev 1.2.
> However, with your change we should do:
>
> pw_password = spw->sp_pwdp;
> -# endif
> -# if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
> +# elif defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
> struct passwd_adjunct *spw;
>
> Because they are all exclusive cases. None of them should ever overlap.
I'm not sure they are exclusive. Since we removed getprpwnam in favour of
getspnam on HP-UX, I think we're currently aiming for this or equivalent
on HP-UX 10.x:
if issecure()
use getpwanam
else
use getspnam
What about something like the attached (untested)?
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
-------------- next part --------------
Index: openbsd-compat/xcrypt.c
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/openbsd-compat/xcrypt.c,v
retrieving revision 1.5
diff -u -p -r1.5 xcrypt.c
--- openbsd-compat/xcrypt.c 25 Sep 2003 10:18:34 -0000 1.5
+++ openbsd-compat/xcrypt.c 21 Nov 2003 03:53:30 -0000
@@ -96,14 +96,14 @@ shadow_pw(struct passwd *pw)
pw_password = spw->sp_pwdp;
# endif
# if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
- struct passwd_adjunct *spw;
- if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL)
- pw_password = spw->pwa_passwd;
+ struct passwd_adjunct *pwa;
+ if (issecure() && (pwa = getpwanam(pw->pw_name)) != NULL)
+ pw_password = pwa->pwa_passwd;
# elif defined(HAVE_SECUREWARE)
- struct pr_passwd *spw = getprpwnam(pw->pw_name);
+ struct pr_passwd *prpw = getprpwnam(pw->pw_name);
- if (spw != NULL)
- pw_password = spw->ufld.fd_encrypt;
+ if (prpw != NULL)
+ pw_password = prpw->ufld.fd_encrypt;
# endif
return pw_password;
More information about the openssh-unix-dev
mailing list