summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-04-18 09:02:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:16:24 -0500
commitbdbd173e8cbce94fbed217932e2c959d1ef4472d (patch)
treeba19e125f07d8c34118c1b1dbf59ce5b0e257f3d /source3
parente69b32e8c28cc0e56c181f2148f29fa60e0114f7 (diff)
downloadsamba-bdbd173e8cbce94fbed217932e2c959d1ef4472d.tar.gz
samba-bdbd173e8cbce94fbed217932e2c959d1ef4472d.tar.bz2
samba-bdbd173e8cbce94fbed217932e2c959d1ef4472d.zip
r15119: Initialize our global sam sid first, quite a lot of the other initialization
routines further down depend on it. Fix bug 3696. Volker (This used to be commit 6c65cccc83aa7b726e23684f979f1488bed3f751)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/server.c33
1 files changed, 22 insertions, 11 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index d5a678b850..a1466c408d 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -912,6 +912,28 @@ void build_options(BOOL screen);
if (!message_init())
exit(1);
+ /* Initialize our global sam sid first -- quite a lot of the other
+ * initialization routines further down depend on it.
+ */
+
+ /* Initialise the password backed before 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);
+
+ /* Fail gracefully if we can't open secrets.tdb */
+
+ if (!secrets_init()) {
+ DEBUG(0, ("ERROR: smbd can not open secrets.tdb\n"));
+ exit(1);
+ }
+
+ if(!get_global_sam_sid()) {
+ DEBUG(0,("ERROR: Samba cannot create a SAM SID.\n"));
+ exit(1);
+ }
+
if (!session_init())
exit(1);
@@ -965,17 +987,6 @@ void build_options(BOOL screen);
* everything after this point is run after the fork()
*/
- /* Initialise the password backed before 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_rpc;
init_modules();