smb_panic and pdb

Jeremy Allison jra at samba.org
Mon Oct 29 18:53:08 UTC 2018


On Mon, Oct 29, 2018 at 07:48:24PM +0100, Andreas Schneider wrote:
> On Monday, 29 October 2018 18:33:51 CET Andrew Bartlett wrote:
> > 
> > My suggestion is to have winbindd (and a few other key utilities) check
> > this at startup when we prepare messaging etc by calling
> > pdb_get_methods_reload() directly.
> > 
> > That could then print a clear, concise message to the user.
> 
> Oh, we already do, but don't check the return code ...
> 
> 
> See attached patch.

Oh well that makes a nice easy fix, thanks ! :-).

LGTM. RB+. I'll push once I've finished reviews I
have in the pipeline, but in the meantime feel free
to push !

Cheers,

	Jeremy.

> Andreas Schneider                      asn at samba.org
> Samba Team                             www.samba.org
> GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D

> From afb5b907fafd8a1ba52d92a58233329e0ff8aa03 Mon Sep 17 00:00:00 2001
> From: Andreas Schneider <asn at samba.org>
> Date: Mon, 29 Oct 2018 19:45:58 +0100
> Subject: [PATCH] s3:winbind: Check return code of initialize_password_db()
> 
> See https://retrace.fedoraproject.org/faf/reports/1577174/
> 
> BUG: https://bugzilla.samba.org/show_bug.cgi?id=13668
> 
> Signed-off-by: Andreas Schneider <asn at samba.org>
> ---
>  source3/winbindd/winbindd.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
> index ae25c6affa3..237841881ac 100644
> --- a/source3/winbindd/winbindd.c
> +++ b/source3/winbindd/winbindd.c
> @@ -1846,7 +1846,13 @@ int main(int argc, const char **argv)
>  	if (!NT_STATUS_IS_OK(status)) {
>  		exit_daemon("Winbindd reinit_after_fork() failed", map_errno_from_nt_status(status));
>  	}
> -	initialize_password_db(true, global_event_context());
> +
> +	ok = initialize_password_db(true, global_event_context());
> +	if (!ok) {
> +		exit_daemon("Failed to initialize passdb backend! "
> +			    "Check the 'passdb backend' variable in your "
> +			    "smb.conf file.", EINVAL);
> +	}
>  
>  	/*
>  	 * Do not initialize the parent-child-pipe before becoming
> -- 
> 2.19.1
> 




More information about the samba-technical mailing list