From de621b906bc7751a8ae62aeb0605e3eb669ed218 Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Thu, 19 Apr 2012 17:16:50 +0100 Subject: [PATCH] On the gneeric authenticator use shadow password API if under linux, allows login on dtlogin. --- cde/programs/dtlogin/sysauth.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cde/programs/dtlogin/sysauth.c b/cde/programs/dtlogin/sysauth.c index 8c5bff65..b6389104 100644 --- a/cde/programs/dtlogin/sysauth.c +++ b/cde/programs/dtlogin/sysauth.c @@ -135,6 +135,10 @@ #include #endif +#if defined(linux) +# include +#endif + #ifdef __hpux /*************************************************************************** * @@ -2414,6 +2418,18 @@ Authenticate( struct display *d, char *name, char *passwd, char **msg ) p = getpwnam(name); +#if defined(linux) + /* + * Use the Linux Shadow Password system to get the crypt()ed password + */ + if(p) { + struct spwd *s = getspnam(name); + if(s) { + p->pw_passwd = s->sp_pwdp; + } + } +#endif + if (!p || strlen(name) == 0 || strcmp (crypt (passwd, p->pw_passwd), p->pw_passwd)) { -- 2.25.1