From ce9da464b7b6272c44b27b0d9f40bc45c5199243 Mon Sep 17 00:00:00 2001 From: Holger Hetterich Date: Tue, 7 Dec 2010 22:59:03 +0100 Subject: [PATCH] Fix bso#7543. If we discover that the smbpasswd database is corrupt because a listed user doesn't have a unix account anymore, print out a warning and return true, so that callers continue walking through the list of users. --- source3/passdb/pdb_smbpasswd.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c index 8d6ac31..55ee235 100644 --- a/source3/passdb/pdb_smbpasswd.c +++ b/source3/passdb/pdb_smbpasswd.c @@ -1238,12 +1238,12 @@ static bool build_sam_account(struct smbpasswd_privates *smbpasswd_state, return False; } - /* verify the user account exists */ + /* verify the user account exists; if not, the caller might still need to continue. */ if ( !(pwfile = Get_Pwnam_alloc(NULL, pw_buf->smb_name )) ) { - DEBUG(0,("build_sam_account: smbpasswd database is corrupt! username %s with uid " + DEBUG(0,("build_sam_account: WARNING: smbpasswd database is corrupt! username %s with uid " "%u is not in unix passwd database!\n", pw_buf->smb_name, pw_buf->smb_userid)); - return False; + return True; } if ( !NT_STATUS_IS_OK( samu_set_unix(sam_pass, pwfile )) ) -- 1.7.1