From 71c0e187665bc17c4d8b3d1d6e7b6fd3aeb30185 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 2 Oct 2024 19:04:02 +0200 Subject: [PATCH] libcli/auth: remove unused creds->sid BUG: https://bugzilla.samba.org/show_bug.cgi?id=15425 Signed-off-by: Stefan Metzmacher Reviewed-by: Douglas Bagnall (cherry picked from commit a9308c490cb5ec8908a3e4c13e2ce8a08b9027e9) --- libcli/auth/credentials.c | 8 -------- libcli/auth/schannel_state_tdb.c | 6 ------ librpc/idl/schannel.idl | 1 - 3 files changed, 15 deletions(-) diff --git a/libcli/auth/credentials.c b/libcli/auth/credentials.c index 342dcd95154..07b146579f6 100644 --- a/libcli/auth/credentials.c +++ b/libcli/auth/credentials.c @@ -709,8 +709,6 @@ struct netlogon_creds_CredentialState *netlogon_creds_server_init(TALLOC_CTX *me } creds->ex->client_sid = *client_sid; - creds->sid = &creds->ex->client_sid; - if (negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) { status = netlogon_creds_init_hmac_sha256(creds, client_challenge, @@ -1207,12 +1205,6 @@ struct netlogon_creds_CredentialState *netlogon_creds_copy( *creds->ex = *creds_in->ex; } - if (creds->ex != NULL) { - creds->sid = &creds->ex->client_sid; - } else { - creds->sid = NULL; - } - memcpy(creds->session_key, creds_in->session_key, sizeof(creds->session_key)); memcpy(creds->seed.data, creds_in->seed.data, sizeof(creds->seed.data)); memcpy(creds->client.data, creds_in->client.data, sizeof(creds->client.data)); diff --git a/libcli/auth/schannel_state_tdb.c b/libcli/auth/schannel_state_tdb.c index ee7ee546baf..4154997fc02 100644 --- a/libcli/auth/schannel_state_tdb.c +++ b/libcli/auth/schannel_state_tdb.c @@ -92,10 +92,6 @@ NTSTATUS schannel_store_session_key_tdb(struct db_context *db_sc, return NT_STATUS_INTERNAL_ERROR; } - if (creds->sid == NULL) { - return NT_STATUS_INTERNAL_ERROR; - } - if (strlen(creds->computer_name) > 15) { /* * We may want to check for a completely @@ -208,8 +204,6 @@ NTSTATUS schannel_fetch_session_key_tdb(struct db_context *db_sc, goto done; } - creds->sid = &creds->ex->client_sid; - DEBUG(3,("schannel_fetch_session_key_tdb: restored schannel info key %s\n", keystr)); diff --git a/librpc/idl/schannel.idl b/librpc/idl/schannel.idl index 76b0dfd4c55..ad296f48d84 100644 --- a/librpc/idl/schannel.idl +++ b/librpc/idl/schannel.idl @@ -35,7 +35,6 @@ interface schannel netr_SchannelType secure_channel_type; [string,charset(UTF8)] uint8 computer_name[]; [string,charset(UTF8)] uint8 account_name[]; - [skip] dom_sid *sid; netlogon_creds_CredentialState_extra_info *ex; } netlogon_creds_CredentialState; -- 2.47.2