[PATCH 1/4] libcli/auth make open_schannel_session_store() public
Andrew Bartlett
abartlet at samba.org
Tue Jun 22 18:31:50 MDT 2010
This will allow TDB_CLEAR_IF_FIRST to be used
---
libcli/auth/schannel_proto.h | 3 +++
libcli/auth/schannel_state_tdb.c | 11 ++++-------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libcli/auth/schannel_proto.h b/libcli/auth/schannel_proto.h
index eee7199..f1731a7 100644
--- a/libcli/auth/schannel_proto.h
+++ b/libcli/auth/schannel_proto.h
@@ -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,
diff --git a/libcli/auth/schannel_state_tdb.c b/libcli/auth/schannel_state_tdb.c
index 9e76781..0e4ab06 100644
--- a/libcli/auth/schannel_state_tdb.c
+++ b/libcli/auth/schannel_state_tdb.c
@@ -35,15 +35,12 @@
#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;
--
1.7.0.1
--=-93mAvNwXxjPKBkpXDXyf
Content-Disposition: attachment; filename="0002-s4-schannel-Open-the-schannel_store.tdb-at-startup.patch"
Content-Type: text/x-patch; name="0002-s4-schannel-Open-the-schannel_store.tdb-at-startup.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
More information about the samba-technical
mailing list