diff options
author | Simo Sorce <idra@samba.org> | 2005-02-27 11:35:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:10:55 -0500 |
commit | b1b14817eaa6e6579596d54166e17bc8d5605c01 (patch) | |
tree | b1af59838a0337dd52b510374b048255397dfe24 /source4/rpc_server/netlogon | |
parent | d2dc86994e7075490f95faa1cc85008feb38f04a (diff) | |
download | samba-b1b14817eaa6e6579596d54166e17bc8d5605c01.tar.gz samba-b1b14817eaa6e6579596d54166e17bc8d5605c01.tar.bz2 samba-b1b14817eaa6e6579596d54166e17bc8d5605c01.zip |
r5585: LDB interfaces change:
changes:
- ldb_wrap disappears from code and become a private structure of db_wrap.c
thanks to our move to talloc in ldb code, we do not need to expose it anymore
- removal of ldb_close() function form the code
thanks to our move to talloc in ldb code, we do not need it anymore
use talloc_free() to close and free an ldb database
- some minor updates to ldb modules code to cope with the change and fix some
bugs I found out during the process
(This used to be commit d58be9e74b786a11a57e89df36081d55730dfe0a)
Diffstat (limited to 'source4/rpc_server/netlogon')
-rw-r--r-- | source4/rpc_server/netlogon/schannel_state.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source4/rpc_server/netlogon/schannel_state.c b/source4/rpc_server/netlogon/schannel_state.c index 8f5f80e256..e7c9c13314 100644 --- a/source4/rpc_server/netlogon/schannel_state.c +++ b/source4/rpc_server/netlogon/schannel_state.c @@ -32,10 +32,10 @@ /* connect to the schannel ldb */ -static struct ldb_wrap *schannel_db_connect(TALLOC_CTX *mem_ctx) +static struct ldb_context *schannel_db_connect(TALLOC_CTX *mem_ctx) { char *path; - struct ldb_wrap *ldb; + struct ldb_context *ldb; path = smbd_tmp_path(mem_ctx, "schannel.ldb"); if (!path) { @@ -58,7 +58,7 @@ static struct ldb_wrap *schannel_db_connect(TALLOC_CTX *mem_ctx) NTSTATUS schannel_store_session_key(TALLOC_CTX *mem_ctx, struct creds_CredentialState *creds) { - struct ldb_wrap *ldb; + struct ldb_context *ldb; struct ldb_message *msg; struct ldb_val val, seed; char *s; @@ -112,23 +112,23 @@ NTSTATUS schannel_store_session_key(TALLOC_CTX *mem_ctx, seed.data = creds->seed.data; seed.length = sizeof(creds->seed.data); - ldb_msg_add_value(ldb->ldb, msg, "sessionKey", &val); - ldb_msg_add_value(ldb->ldb, msg, "seed", &seed); - ldb_msg_add_string(ldb->ldb, msg, "expiry", s); - ldb_msg_add_string(ldb->ldb, msg, "negotiateFlags", f); - ldb_msg_add_string(ldb->ldb, msg, "secureChannelType", sct); - ldb_msg_add_string(ldb->ldb, msg, "accountName", creds->account_name); - ldb_msg_add_string(ldb->ldb, msg, "computerName", creds->computer_name); + ldb_msg_add_value(ldb, msg, "sessionKey", &val); + ldb_msg_add_value(ldb, msg, "seed", &seed); + ldb_msg_add_string(ldb, msg, "expiry", s); + ldb_msg_add_string(ldb, msg, "negotiateFlags", f); + ldb_msg_add_string(ldb, msg, "secureChannelType", sct); + ldb_msg_add_string(ldb, msg, "accountName", creds->account_name); + ldb_msg_add_string(ldb, msg, "computerName", creds->computer_name); - ldb_delete(ldb->ldb, msg->dn); + ldb_delete(ldb, msg->dn); - ret = ldb_add(ldb->ldb, msg); + ret = ldb_add(ldb, msg); talloc_free(s); if (ret != 0) { DEBUG(0,("Unable to add %s to session key db - %s\n", - msg->dn, ldb_errstring(ldb->ldb))); + msg->dn, ldb_errstring(ldb))); talloc_free(ldb); talloc_free(msg); return NT_STATUS_INTERNAL_DB_CORRUPTION; @@ -148,7 +148,7 @@ NTSTATUS schannel_fetch_session_key(TALLOC_CTX *mem_ctx, const char *computer_name, struct creds_CredentialState **creds) { - struct ldb_wrap *ldb; + struct ldb_context *ldb; time_t expiry; struct ldb_message **res; int ret; @@ -171,7 +171,7 @@ NTSTATUS schannel_fetch_session_key(TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - ret = ldb_search(ldb->ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res); + ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res); if (ret != 1) { talloc_free(ldb); return NT_STATUS_INVALID_HANDLE; |