summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/pdbedit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index 23c4e71e0d..a464299438 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -708,6 +708,10 @@ static int new_user(const char *username, const char *fullname,
pwd1 = get_pass( "new password:", stdin_get);
pwd2 = get_pass( "retype new password:", stdin_get);
+ if (!pwd1 || !pwd2) {
+ fprintf(stderr, "Failed to read passwords.\n");
+ return -1;
+ }
ret = strcmp(pwd1, pwd2);
if (ret != 0) {
fprintf (stderr, "Passwords do not match!\n");