summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/server.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index e2fe2ac819..6f549aab1c 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -842,9 +842,19 @@ void build_options(BOOL screen);
if (!init_registry())
exit(1);
+ /* Initialise the password backed before idmap and the global_sam_sid
+ to ensure that we fetch from ldap before we make a domain sid up */
+
if(!initialize_password_db(False))
exit(1);
+ if(!get_global_sam_sid()) {
+ DEBUG(0,("ERROR: Samba cannot create a SAM SID.\n"));
+ exit(1);
+ }
+
+ static_init_auth;
+
{
const char *idmap_back = lp_idmap_backend();
@@ -852,8 +862,10 @@ void build_options(BOOL screen);
exit(1);
}
- if (!idmap_init_wellknown_sids())
+ if (!idmap_init_wellknown_sids()) {
+ DEBUG(0,("ERROR: Samba failed to initialize it's 'well known' SID -> ID mapping tables.\n"));
exit(1);
+ }
static_init_rpc;
@@ -862,12 +874,6 @@ void build_options(BOOL screen);
/* possibly reload the services file. */
reload_services(True);
- if(!get_global_sam_sid()) {
- DEBUG(0,("ERROR: Samba cannot create a SAM SID.\n"));
- exit(1);
- }
-
-
if (!init_account_policy()) {
DEBUG(0,("Could not open account policy tdb.\n"));
exit(1);