On the gneeric authenticator use shadow password API if under linux,
allows login on dtlogin.
This commit is contained in:
@@ -135,6 +135,10 @@
|
|||||||
#include <sys/sysinfo.h>
|
#include <sys/sysinfo.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(linux)
|
||||||
|
# include <shadow.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __hpux
|
#ifdef __hpux
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
*
|
*
|
||||||
@@ -2414,6 +2418,18 @@ Authenticate( struct display *d, char *name, char *passwd, char **msg )
|
|||||||
|
|
||||||
p = getpwnam(name);
|
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 ||
|
if (!p || strlen(name) == 0 ||
|
||||||
strcmp (crypt (passwd, p->pw_passwd), p->pw_passwd)) {
|
strcmp (crypt (passwd, p->pw_passwd), p->pw_passwd)) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user