summaryrefslogtreecommitdiff
path: root/checkpasswd/checkpassword.c
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-06-03 07:43:55 (GMT)
committerJohn Denker <jsd@av8n.com>2012-07-14 01:39:07 (GMT)
commit3cfa63750d7e82e0e4b94f7f7b67639bdbd016af (patch)
treefdf27377b7ff99d5eed7db39149639400f73de3d /checkpasswd/checkpassword.c
parent901d0f9826229478c4dae4a99c750e148c00ca95 (diff)
optional debugging features in checkpassword
Diffstat (limited to 'checkpasswd/checkpassword.c')
-rw-r--r--checkpasswd/checkpassword.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/checkpasswd/checkpassword.c b/checkpasswd/checkpassword.c
index 7e5ee18..6056525 100644
--- a/checkpasswd/checkpassword.c
+++ b/checkpasswd/checkpassword.c
@@ -19,6 +19,10 @@ static struct spwd *spw;
static struct userpw *upw;
#endif
+#ifdef NASTY_DEBUG
+# include <stdio.h>
+#endif
+
static char up[513];
static int uplen;
@@ -57,6 +61,11 @@ main(int argc,char **argv)
if (i >= uplen) _exit(2);
while (up[i++]) if (i >= uplen) _exit(2);
+#ifdef NASTY_DEBUG
+ fprintf(stderr, "checkpassw called with '%s' '%s'\n",
+ login, password);
+#endif
+
pw = getpwnam(login);
if (pw)
stored = pw->pw_passwd;