[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-4810-gaf0ceb7
Jeremy Allison
jra at samba.org
Sat Jan 10 03:40:35 GMT 2009
The branch, v3-3-test has been updated
via af0ceb784af1ea8d591f5c35fb010d60b178a8d2 (commit)
from b99d98ff2ef5491979301656e7f516d3c8829f6e (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit af0ceb784af1ea8d591f5c35fb010d60b178a8d2
Author: Karolin Seeger <kseeger at samba.org>
Date: Fri Jan 9 19:39:46 2009 -0800
s3/smbpasswd: Check if Unix account exists before asking for the password.
Admins shouldn't have to type in the password twice when the passdb account
cannot be created because the Unix account is missing.
Karolin
-----------------------------------------------------------------------
Summary of changes:
source/utils/smbpasswd.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/utils/smbpasswd.c b/source/utils/smbpasswd.c
index b18ab55..78c1ce8 100644
--- a/source/utils/smbpasswd.c
+++ b/source/utils/smbpasswd.c
@@ -430,6 +430,15 @@ static int process_root(int local_flags)
}
if((local_flags & LOCAL_SET_PASSWORD) && (new_passwd == NULL)) {
+ struct passwd *passwd = getpwnam_alloc(NULL, user_name);
+
+ if (!passwd) {
+ 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);
if(!new_passwd) {
--
Samba Shared Repository
More information about the samba-cvs
mailing list