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