[PATCH 3/4] s3:schannel Open the schannel_state.tdb at startup

Andrew Bartlett abartlet at samba.org
Tue Jun 22 18:36:32 MDT 2010


This will allow future TDB_CLEAR_IF_FIRST behaviour
---
 source3/smbd/server.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 2bb0bb8..03fd9aa 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -25,6 +25,7 @@
 #include "smbd/globals.h"
 #include "librpc/gen_ndr/messaging.h"
 #include "registry.h"
+#include "libcli/auth/schannel.h"
 
 static_decl_rpc;
 
@@ -1023,6 +1024,13 @@ extern void build_options(bool screen);
 		exit(1);
 	}
 
+	if (lp_server_role() == ROLE_DOMAIN_BDC || lp_server_role() == ROLE_DOMAIN_PDC) {
+		if (!open_schannel_session_store(talloc_autofree_context(), lp_private_dir())) {
+			DEBUG(0,("ERROR: Samba cannot open schannel store for secured NETLOGON operations.\n"));
+			exit(1);
+		}
+	}
+
 	if(!get_global_sam_sid()) {
 		DEBUG(0,("ERROR: Samba cannot create a SAM SID.\n"));
 		exit(1);
-- 
1.7.0.1


--=-2A0ML4+U++I4Wmz4q2Yf
Content-Disposition: attachment; filename*0=0004-schannel-Change-to-TDB_CLEAR_IF_FIRST-to-reduce-fsyn.pat; filename*1=ch
Content-Type: text/x-patch; name="0004-schannel-Change-to-TDB_CLEAR_IF_FIRST-to-reduce-fsyn.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



More information about the samba-technical mailing list