From: Stefan Metzmacher Date: Wed, 11 Dec 2024 09:14:44 +0000 (+0100) Subject: libcli/auth: add let netlogon_creds_alloc() use _talloc_keep_secret() X-Git-Tag: tdb-1.4.13~362 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=36b5a75123742b69be190618b549e06374852b58;p=thirdparty%2Fsamba.git libcli/auth: add let netlogon_creds_alloc() use _talloc_keep_secret() Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider --- diff --git a/libcli/auth/credentials.c b/libcli/auth/credentials.c index a6770d87cf8..86bb8c33819 100644 --- a/libcli/auth/credentials.c +++ b/libcli/auth/credentials.c @@ -492,6 +492,7 @@ netlogon_creds_alloc(TALLOC_CTX *mem_ctx, struct netlogon_creds_CredentialState *creds = NULL; struct timeval tv = timeval_current(); NTTIME now = timeval_to_nttime(&tv); + const char *name = NULL; creds = talloc_zero(mem_ctx, struct netlogon_creds_CredentialState); if (creds == NULL) { @@ -523,6 +524,8 @@ netlogon_creds_alloc(TALLOC_CTX *mem_ctx, creds->client_sid = global_sid_NULL; } + name = talloc_get_name(creds); + _talloc_keep_secret(creds, name); return creds; }