projects
/
oweals
/
cde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc96e6f
)
On the gneeric authenticator use shadow password API if under linux,
author
Peter Howkins
<peter@xubuntu.uk.nds.com>
Thu, 19 Apr 2012 16:16:50 +0000
(17:16 +0100)
committer
Peter 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
patch
|
blob
|
history
diff --git
a/cde/programs/dtlogin/sysauth.c
b/cde/programs/dtlogin/sysauth.c
index 8c5bff652564c8fa4d1cbae154518efcb777dfed..b63891047b23fdf08466049d81fe61c07327836d 100644
(file)
--- a/
cde/programs/dtlogin/sysauth.c
+++ b/
cde/programs/dtlogin/sysauth.c
@@
-135,6
+135,10
@@
#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)) {