summaryrefslogtreecommitdiffstats
path: root/auth-passwd.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-09-29 14:01:36 +0200
committerDamien Miller <djm@mindrot.org>2000-09-29 14:01:36 +0200
commit78315eb6d6bf411b07d9e0bc1ede41fae9484f25 (patch)
tree6c1ff91e092df4d86b076f7f4917764bb6d17f5e /auth-passwd.c
parent - (djm) Clean up. Strip some unnecessary differences with OpenBSD's code, (diff)
downloadopenssh-78315eb6d6bf411b07d9e0bc1ede41fae9484f25.tar.xz
openssh-78315eb6d6bf411b07d9e0bc1ede41fae9484f25.zip
- (djm) Merged big SCO portability patch from Tim Rice
<tim@multitalents.net>
Diffstat (limited to 'auth-passwd.c')
-rw-r--r--auth-passwd.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/auth-passwd.c b/auth-passwd.c
index 18f9b3c15..8dd6034d8 100644
--- a/auth-passwd.c
+++ b/auth-passwd.c
@@ -75,6 +75,11 @@ RCSID("$OpenBSD: auth-passwd.c,v 1.17 2000/09/07 20:27:49 deraadt Exp $");
# include <hpsecurity.h>
# include <prot.h>
#endif
+#ifdef HAVE_SCO_PROTECTED_PW
+# include <sys/security.h>
+# include <sys/audit.h>
+# include <prot.h>
+#endif /* HAVE_SCO_PROTECTED_PW */
#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
# include <shadow.h>
#endif
@@ -108,6 +113,9 @@ auth_password(struct passwd * pw, const char *password)
#ifdef __hpux
struct pr_passwd *spw;
#endif
+#ifdef HAVE_SCO_PROTECTED_PW
+ struct pr_passwd *spw;
+#endif /* HAVE_SCO_PROTECTED_PW */
#if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
struct spwd *spw;
#endif
@@ -181,10 +189,18 @@ auth_password(struct passwd * pw, const char *password)
if (spw != NULL)
pw_password = spw->sp_pwdp;
#endif /* defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW) */
+
+#ifdef HAVE_SCO_PROTECTED_PW
+ spw = getprpwnam(pw->pw_name);
+ if (spw != NULL)
+ pw_password = spw->ufld.fd_encrypt;
+#endif /* HAVE_SCO_PROTECTED_PW */
+
#if defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW)
if (issecure() && (spw = getpwanam(pw->pw_name)) != NULL)
pw_password = spw->pwa_passwd;
#endif /* defined(HAVE_GETPWANAM) && !defined(DISABLE_SHADOW) */
+
#if defined(__hpux)
if (iscomsec() && (spw = getprpwnam(pw->pw_name)) != NULL)
pw_password = spw->ufld.fd_encrypt;