From 9e25f33a1a06e1374bb643cb087af0e0bedb99c7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Thu, 20 Oct 2005 03:38:01 +0000 Subject: r11199: Push an objectSid into the schannel state database, to match the new header. Andrew Bartlett (This used to be commit a665b56085cbf89c6deaeef0deaed31fcbc07458) --- source4/auth/gensec/schannel_state.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'source4') diff --git a/source4/auth/gensec/schannel_state.c b/source4/auth/gensec/schannel_state.c index 5b398b2996..5c789b3f2e 100644 --- a/source4/auth/gensec/schannel_state.c +++ b/source4/auth/gensec/schannel_state.c @@ -71,7 +71,6 @@ NTSTATUS schannel_store_session_key(TALLOC_CTX *mem_ctx, struct ldb_val val, seed; char *f; char *sct; - char *rid; int ret; ldb = schannel_db_connect(mem_ctx); @@ -93,13 +92,6 @@ NTSTATUS schannel_store_session_key(TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - rid = talloc_asprintf(mem_ctx, "%u", (unsigned int)creds->rid); - - if (rid == NULL) { - talloc_free(ldb); - return NT_STATUS_NO_MEMORY; - } - msg = ldb_msg_new(ldb); if (msg == NULL) { talloc_free(ldb); @@ -126,7 +118,7 @@ NTSTATUS schannel_store_session_key(TALLOC_CTX *mem_ctx, ldb_msg_add_string(msg, "accountName", creds->account_name); ldb_msg_add_string(msg, "computerName", creds->computer_name); ldb_msg_add_string(msg, "flatname", creds->domain); - ldb_msg_add_string(msg, "rid", rid); + samdb_msg_add_dom_sid(ldb, mem_ctx, msg, "objectSid", creds->sid); ldb_delete(ldb, msg->dn); @@ -209,7 +201,7 @@ NTSTATUS schannel_fetch_session_key(TALLOC_CTX *mem_ctx, (*creds)->domain = talloc_reference(*creds, ldb_msg_find_string(res[0], "flatname", NULL)); - (*creds)->rid = ldb_msg_find_uint(res[0], "rid", 0); + (*creds)->sid = samdb_result_dom_sid(*creds, res[0], "objectSid"); talloc_free(ldb); -- cgit