]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: Zero memory of idmap_fetch_secret() users
authorPavel Filipenský <pfilipensky@samba.org>
Fri, 5 Aug 2022 09:09:37 +0000 (11:09 +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/lib/smbldap.c
source3/winbindd/idmap_ldap.c
source3/winbindd/idmap_rfc2307.c

index 4815dd81fc38d852a4c21f167a8f2545f075bc8c..cb85208bfb1a1477ffdf41ab39f08e433653f246 100644 (file)
@@ -1744,7 +1744,7 @@ void smbldap_free_struct(struct smbldap_state **ldap_state)
        }
 
        SAFE_FREE((*ldap_state)->bind_dn);
-       SAFE_FREE((*ldap_state)->bind_secret);
+       BURN_FREE_STR((*ldap_state)->bind_secret);
        smbldap_set_bind_callback(*ldap_state, NULL, NULL);
 
        TALLOC_FREE(*ldap_state);
index 36ab94b766741957e3a4798dacd04d1cfd9552e9..7ad5ff47acfd6fb816b8576bd880dbe10ffc4c7c 100644 (file)
@@ -107,7 +107,7 @@ static NTSTATUS get_credentials( TALLOC_CTX *mem_ctx,
        ret = NT_STATUS_OK;
 
 done:
-       SAFE_FREE(secret);
+       BURN_FREE_STR(secret);
 
        return ret;
 }
index d84cf930f75e7b4ea943eaa6a913ea61b227a35d..2b3223829e2e36d98283249c7a329ad95c46bffa 100644 (file)
@@ -198,7 +198,7 @@ static NTSTATUS idmap_rfc2307_init_ldap(struct idmap_rfc2307_context *ctx,
        ret = smbldap_init(mem_ctx, global_event_context(), url,
                           (user_dn == NULL), user_dn, secret,
                           &ctx->smbldap_state);
-       SAFE_FREE(secret);
+       BURN_FREE_STR(secret);
        if (!NT_STATUS_IS_OK(ret)) {
                DEBUG(1, ("ERROR: smbldap_init (%s) failed!\n", url));
                goto done;