passdb: Do not panic in initialize_password_db
commit6e583c72cc0c235a997c700342e8dc14cb65ec29
authorChristof Schmitt <christof.schmitt@us.ibm.com>
Tue, 24 Apr 2012 21:42:28 +0000 (24 14:42 -0700)
committerVolker Lendecke <vl@samba.org>
Mon, 30 Apr 2012 09:30:29 +0000 (30 11:30 +0200)
treeabf20ddf92e6b0956ec1801964f7e0b0f06b5a09
parentdabb0562500bb83ded8243705065c4ef6ebb5049
passdb: Do not panic in initialize_password_db

A call to initialize_password_db leads to smb_panic in case the backend
returns an error. All callers to initialize_password_db check the return
value, so this code path should return the status instead of calling
smb_panic.

Move the call to smb_panic from pdb_get_methods_reload pdb_get_methods
to get it out of the initialize code path.  This allows printing the
proper error message for 'net getlocalsid' which is much nicer than
printing the panic stack trace.
source3/passdb/pdb_interface.c