Fixes for UnixWare 2.x with shadow passwords from
authorSamba Release Account <samba-bugs@samba.org>
Thu, 3 Jul 1997 17:19:46 +0000 (17:19 +0000)
committerSamba Release Account <samba-bugs@samba.org>
Thu, 3 Jul 1997 17:19:46 +0000 (17:19 +0000)
Warren Young <tkennedy@cyberport.com>.
(This used to be commit 885b42b44752249c85bb924c9ceefa5b710225da)

source3/include/includes.h
source3/smbd/password.c

index 7403fc4b641393cd8c8a07f08ddc57186b886f30..44707673ee14e063ed3aebb5aea9a1e0a93904cc 100644 (file)
@@ -968,6 +968,12 @@ typedef int mode_t;
 #define HAVE_VFORK 1
 #endif
 
+/* For UnixWare 2.x's ia_uinfo routines. (tangent@cyberport.com) */
+#ifdef IA_UINFO
+#include <iaf.h>
+#include <ia.h>
+#endif
+
 
 /*******************************************************************
 end of the platform specific sections
index 803418c97e3c5f0d7fc65d4992b926114cbfe3ba..2ba09f5ad99c0a523a8b7ec12cffe06ad7950c17 100644 (file)
@@ -887,6 +887,15 @@ BOOL password_ok(char *user,char *password, int pwlen, struct passwd *pwd)
     if (spass && spass->sp_pwdp)
       pass->pw_passwd = spass->sp_pwdp;
   }
+#elif defined(IA_UINFO)
+  {
+      /* Need to get password with SVR4.2's ia_ functions instead of
+         get{sp,pw}ent functions. Required by UnixWare 2.x, tested on 
+         version 2.1. (tangent@cyberport.com) */
+      uinfo_t uinfo;
+      if (ia_openinfo(pass->pw_name, &uinfo) != -1)
+        ia_get_logpwd(uinfo, &(pass->pw_passwd));
+  }
 #endif
 
 #ifdef SecureWare