]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libsmb: Zero memory in trust_pw_change()
authorPavel Filipenský <pfilipensky@samba.org>
Wed, 27 Jul 2022 15:21:08 +0000 (17:21 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 26 Aug 2022 07:59:32 +0000 (07:59 +0000)
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/libsmb/trusts_util.c

index 7ad73cfd8dba9dd64c86b3acacb83996d97c1db4..356366b6a9d1be4086fa996f891477212f9bdf0f 100644 (file)
@@ -311,6 +311,7 @@ NTSTATUS trust_pw_change(struct netlogon_creds_cli_context *context,
                TALLOC_FREE(frame);
                return status;
        }
+       talloc_keep_secret(new_trust_pw_blob.data);
 
        switch (sec_channel_type) {
 
@@ -365,7 +366,7 @@ NTSTATUS trust_pw_change(struct netlogon_creds_cli_context *context,
                 * We use the password that's already persistent in
                 * our database in order to handle failures.
                 */
-               data_blob_clear_free(&new_trust_pw_blob);
+               data_blob_free(&new_trust_pw_blob);
                new_trust_pw_blob = info->next_change->password->cleartext_blob;
                break;