summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-01-09 19:40:09 -0800
committerJeremy Allison <jra@samba.org>2009-01-09 19:40:09 -0800
commitcda0b7051967afaaaafbd3dad2052c66b3035491 (patch)
treebb910d631b14bb59dc1531f3296234c7e73c41bd /source3
parent964acde86e17d91148e063ce81014444e4c1f63d (diff)
downloadsamba-cda0b7051967afaaaafbd3dad2052c66b3035491.tar.gz
samba-cda0b7051967afaaaafbd3dad2052c66b3035491.tar.bz2
samba-cda0b7051967afaaaafbd3dad2052c66b3035491.zip
Minor tidyup of unix account missing code.
Jeremy.
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/smbpasswd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index 93e2f81585..4cd0d55f56 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/utils/smbpasswd.c
@@ -430,14 +430,14 @@ static int process_root(int local_flags)
}
if((local_flags & LOCAL_SET_PASSWORD) && (new_passwd == NULL)) {
- struct passwd *passwd;
+ struct passwd *passwd = getpwnam_alloc(NULL, user_name);
- passwd = getpwnam_alloc(NULL, user_name);
if (!passwd) {
- DEBUG(0, ("Cannot locate Unix account for "
- "'%s'!\n", user_name));
- exit(1);;
+ fprintf(stderr, "Cannot locate Unix account for "
+ "'%s'!\n", user_name);
+ exit(1);
}
+ TALLOC_FREE(passwd);
new_passwd = prompt_for_new_password(stdin_passwd_get);