]> andersk Git - openssh.git/blobdiff - openbsd-compat/xcrypt.c
- (dtucker) [configure.ac openbsd-compat/glob.{c,h}] Bug #1407: force use of
[openssh.git] / openbsd-compat / xcrypt.c
index 167a235132c86e19e1b0280d3b5e7b7ebf4fe637..d8636bb398e107da73820616002f014d07d5445c 100644 (file)
@@ -24,7 +24,9 @@
 
 #include "includes.h"
 
-#if !defined(HAVE_OSF_SIA)
+#include <sys/types.h>
+#include <unistd.h>
+#include <pwd.h>
 
 # ifdef HAVE_CRYPT_H
 #  include <crypt.h>
 #  include "md5crypt.h"
 # endif 
 
-# ifdef HAVE_CYGWIN
-#  undef ERROR
-#  include <windows.h>
-#  include <sys/cygwin.h>
-#  define is_winnt       (GetVersion() < 0x80000000)
-# endif
-
 char *
 xcrypt(const char *password, const char *salt)
 {
@@ -72,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);
@@ -96,28 +91,27 @@ shadow_pw(struct passwd *pw)
 {
        char *pw_password = pw->pw_passwd;
 
-# if defined(HAVE_SHADOW_H) && !defined(DISABLED_SHADOW)
+# if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
        struct spwd *spw = getspnam(pw->pw_name);
 
        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.055095 seconds and 4 git commands to generate.