From: Stefan Metzmacher Date: Wed, 2 Oct 2024 17:04:02 +0000 (+0200) Subject: libcli/auth: remove unused creds->sid X-Git-Tag: samba-4.21.2~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a0ad07e82f08d6362cc6de1a0ec48285d76f391f;p=thirdparty%2Fsamba.git 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) --- 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;