[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-3345-g3bb5e3e
Jeremy Allison
jra at samba.org
Sat Jan 10 03:44:00 GMT 2009
The branch, v3-2-test has been updated
via 3bb5e3e0b44c25eede60925cfdc89d7df0d0e486 (commit)
from 642532608bea788e174f15aabd13376847de106a (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 3bb5e3e0b44c25eede60925cfdc89d7df0d0e486
Author: Karolin Seeger <kseeger at samba.org>
Date: Fri Jan 9 19:43:13 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 493a249..041b02a 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