summaryrefslogtreecommitdiff
path: root/source4/auth/gensec
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-10-20 03:38:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:00 -0500
commit9e25f33a1a06e1374bb643cb087af0e0bedb99c7 (patch)
tree88b7258ef800704da0aa87b7b93ab8f995ca7b68 /source4/auth/gensec
parentbf38a5e7c59defc19781ceee05b0287e00a24364 (diff)
downloadsamba-9e25f33a1a06e1374bb643cb087af0e0bedb99c7.tar.gz
samba-9e25f33a1a06e1374bb643cb087af0e0bedb99c7.tar.bz2
samba-9e25f33a1a06e1374bb643cb087af0e0bedb99c7.zip
r11199: Push an objectSid into the schannel state database, to match the new header.
Andrew Bartlett (This used to be commit a665b56085cbf89c6deaeef0deaed31fcbc07458)
Diffstat (limited to 'source4/auth/gensec')
-rw-r--r--source4/auth/gensec/schannel_state.c12
1 files changed, 2 insertions, 10 deletions
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);