summaryrefslogtreecommitdiff
path: root/libmisc/valid.c
diff options
context:
space:
mode:
authorChristian Perrier <bubulle@debian.org>2014-03-01 19:59:36 +0100
committerChristian Perrier <bubulle@debian.org>2014-03-01 19:59:36 +0100
commit65b471a2f27acb2f3ce378106eb8aeba8b496557 (patch)
tree29941e07f9b1d7c9a44a08b65782505eb6ef58a5 /libmisc/valid.c
parentdb1dc7288b64873f4f39e8404fd99c1bf55c7a8b (diff)
downloadshadow-65b471a2f27acb2f3ce378106eb8aeba8b496557.tar.gz
Imported Upstream version 4.2upstream/4.2
Diffstat (limited to 'libmisc/valid.c')
-rw-r--r--libmisc/valid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmisc/valid.c b/libmisc/valid.c
index 1cfe2392..4b85d67c 100644
--- a/libmisc/valid.c
+++ b/libmisc/valid.c
@@ -32,7 +32,7 @@
#include <config.h>
-#ident "$Id: valid.c 3232 2010-08-22 19:13:53Z nekral-guest $"
+#ident "$Id$"
#include <sys/types.h>
#include <stdio.h>
@@ -95,6 +95,7 @@ bool valid (const char *password, const struct passwd *ent)
*/
if ( (NULL != ent->pw_name)
+ && (NULL != encrypted)
&& (strcmp (encrypted, ent->pw_passwd) == 0)) {
return true;
} else {