From 885b42b44752249c85bb924c9ceefa5b710225da Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Thu, 3 Jul 1997 17:19:46 +0000 Subject: [PATCH] Fixes for UnixWare 2.x with shadow passwords from Warren Young . --- source/include/includes.h | 6 ++++++ source/smbd/password.c | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/source/include/includes.h b/source/include/includes.h index 7403fc4b641..44707673ee1 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -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 +#include +#endif + /******************************************************************* end of the platform specific sections diff --git a/source/smbd/password.c b/source/smbd/password.c index 803418c97e3..2ba09f5ad99 100644 --- a/source/smbd/password.c +++ b/source/smbd/password.c @@ -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 -- 2.11.4.GIT