Fixes for OpenBSD

This commit is contained in:
Ulrich Wilkens
2018-06-01 03:29:42 +02:00
committed by Jon Trulson
parent 07f272122d
commit 885b65a09a
11 changed files with 42 additions and 31 deletions

View File

@@ -1956,6 +1956,13 @@ Authenticate( struct display *d, char *name, char *passwd, char **msg )
}
#endif
#if defined(__OpenBSD__) && OSMAJORVERSION > 5
/*
* Use the OpenBSD getpwnam_shadow function to get the crypt()ed password
*/
p = getpwnam_shadow(name);
#endif
if (!p || strlen(name) == 0 ||
strcmp (crypt (passwd, p->pw_passwd), p->pw_passwd)) {