[SCM] Samba Shared Repository - branch master updated - 1b9ae1a6bb771ee16908e66fa35dada514a8f36d

Karolin Seeger kseeger at samba.org
Fri Jan 9 15:12:40 GMT 2009


The branch, master has been updated
       via  1b9ae1a6bb771ee16908e66fa35dada514a8f36d (commit)
      from  49a6d757b4d944cd22c91b2838beb83f04fbe1e9 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 1b9ae1a6bb771ee16908e66fa35dada514a8f36d
Author: Karolin Seeger <kseeger at samba.org>
Date:   Fri Jan 9 15:54:16 2009 +0100

    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:
 source3/utils/smbpasswd.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/smbpasswd.c b/source3/utils/smbpasswd.c
index d2652ad..93e2f81 100644
--- a/source3/utils/smbpasswd.c
+++ b/source3/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;
+
+			passwd = getpwnam_alloc(NULL, user_name);
+			if (!passwd) {
+				DEBUG(0, ("Cannot locate Unix account for "
+					  "'%s'!\n", user_name));
+				exit(1);;
+			}
+
 			new_passwd = prompt_for_new_password(stdin_passwd_get);
 
 			if(!new_passwd) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list