s3:winbind: Check return code of initialize_password_db()
authorAndreas Schneider <asn@samba.org>
Mon, 29 Oct 2018 18:45:58 +0000 (19:45 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 29 Oct 2018 19:09:25 +0000 (20:09 +0100)
See https://retrace.fedoraproject.org/faf/reports/1577174/

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13668

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd.c

index ae25c6a..2378418 100644 (file)
@@ -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