On the gneeric authenticator use shadow password API if under linux,
authorPeter Howkins <peter@xubuntu.uk.nds.com>
Thu, 19 Apr 2012 16:16:50 +0000 (17:16 +0100)
committerPeter Howkins <peter@xubuntu.uk.nds.com>
Thu, 19 Apr 2012 16:16:50 +0000 (17:16 +0100)
allows login on dtlogin.

cde/programs/dtlogin/sysauth.c

index 8c5bff652564c8fa4d1cbae154518efcb777dfed..b63891047b23fdf08466049d81fe61c07327836d 100644 (file)
 #include <sys/sysinfo.h>
 #endif
 
+#if defined(linux)
+#    include <shadow.h>
+#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)) {