libcli/auth make open_schannel_session_store() public
authorAndrew Bartlett <abartlet@samba.org>
Wed, 23 Jun 2010 00:31:50 +0000 (10:31 +1000)
committerJeremy Allison <jra@samba.org>
Fri, 25 Jun 2010 18:57:23 +0000 (11:57 -0700)
This will allow TDB_CLEAR_IF_FIRST to be used

Signed-off-by: Jeremy Allison <jra@samba.org>
libcli/auth/schannel_proto.h
libcli/auth/schannel_state_tdb.c

index eee71995765c513ad3ce81aee75e417ada248bff..f1731a784a4c28eca06db657a76150d59555460c 100644 (file)
@@ -23,6 +23,9 @@
 #ifndef _LIBCLI_AUTH_SCHANNEL_PROTO_H__
 #define _LIBCLI_AUTH_SCHANNEL_PROTO_H__
 
+struct tdb_wrap *open_schannel_session_store(TALLOC_CTX *mem_ctx,
+                                            const char *private_dir);
+
 NTSTATUS netsec_incoming_packet(struct schannel_state *state,
                                TALLOC_CTX *mem_ctx,
                                bool do_unseal,
index 9e767810a18de7102b46798bd706b1b56e622e71..0e4ab06515929b5edd94935b677850c5a7238b19 100644 (file)
 #define SECRETS_SCHANNEL_STATE "SECRETS/SCHANNEL"
 
 /******************************************************************************
- Open or create the schannel session store tdb.
+ Open or create the schannel session store tdb.  Non-static so it can
+ be called from parent processes to corectly handle TDB_CLEAR_IF_FIRST
 *******************************************************************************/
 
-#define SCHANNEL_STORE_VERSION_1 1
-#define SCHANNEL_STORE_VERSION_2 2 /* should not be used */
-#define SCHANNEL_STORE_VERSION_CURRENT SCHANNEL_STORE_VERSION_1
-
-static struct tdb_wrap *open_schannel_session_store(TALLOC_CTX *mem_ctx,
-                                                   const char *private_dir)
+struct tdb_wrap *open_schannel_session_store(TALLOC_CTX *mem_ctx,
+                                            const char *private_dir)
 {
        TDB_DATA vers;
        uint32_t ver;