]> andersk Git - openssh.git/blobdiff - openbsd-compat/xcrypt.c
- djm@cvs.openbsd.org 2010/01/30 02:54:53
[openssh.git] / openbsd-compat / xcrypt.c
index 882185718f733b9c7aa03b35a3abec12ef4c821a..6291e2884c5c266478ff1a5733b8bedb1260eeab 100644 (file)
 
 #include "includes.h"
 
-#if !defined(HAVE_OSF_SIA)
+#include <sys/types.h>
+#include <unistd.h>
+#include <pwd.h>
 
-# ifdef HAVE_CRYPT_H
+# if defined(HAVE_CRYPT_H) && !defined(HAVE_SECUREWARE)
 #  include <crypt.h>
 # endif
 
@@ -65,12 +67,12 @@ xcrypt(const char *password, const char *salt)
                 crypted = md5_crypt(password, salt);
         else
                 crypted = crypt(password, salt);
-# elsif defined(__hpux) && !defined(HAVE_SECUREWARE)
+# elif defined(__hpux) && !defined(HAVE_SECUREWARE)
        if (iscomsec())
                 crypted = bigcrypt(password, salt);
         else
                 crypted = crypt(password, salt);
-# elsif defined(HAVE_SECUREWARE)
+# elif defined(HAVE_SECUREWARE)
         crypted = bigcrypt(password, salt);
 # else
         crypted = crypt(password, salt);
@@ -95,22 +97,21 @@ shadow_pw(struct passwd *pw)
        if (spw != NULL)
                pw_password = spw->sp_pwdp;
 # endif
+
+#ifdef USE_LIBIAF
+       return(get_iaf_password(pw));
+#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;
-# elsif defined(HAVE_SECUREWARE)
+# elif defined(HAVE_SECUREWARE)
        struct pr_passwd *spw = getprpwnam(pw->pw_name);
 
        if (spw != NULL)
                pw_password = spw->ufld.fd_encrypt;
-# elsif defined(__hpux) && !defined(HAVE_SECUREWARE)
-       struct pr_passwd *spw;
-        if (iscomsec() && (spw = getprpwnam(pw->pw_name)) != NULL)
-                pw_password = spw->ufld.fd_encrypt;
 # endif
 
        return pw_password;
 }
-
-#endif /* !defined(HAVE_OSF_SIA) */
This page took 0.039208 seconds and 4 git commands to generate.