From: Andreas Schneider Date: Thu, 18 Mar 2021 10:37:03 +0000 (+0100) Subject: s3:netapi: Remove password from 'struct libnetapi_ctx' X-Git-Tag: tevent-0.11.0~1414 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51d5bebcc156ee9b93937deefc534e44911245a7;p=thirdparty%2Fsamba.git s3:netapi: Remove password from 'struct libnetapi_ctx' Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner --- diff --git a/source3/lib/netapi/netapi.c b/source3/lib/netapi/netapi.c index 8d5c8c85f5a..25983ced7ec 100644 --- a/source3/lib/netapi/netapi.c +++ b/source3/lib/netapi/netapi.c @@ -294,12 +294,6 @@ NET_API_STATUS libnetapi_set_password(struct libnetapi_ctx *ctx, return W_ERROR_V(WERR_INVALID_PARAMETER); } - TALLOC_FREE(ctx->password); - ctx->password = talloc_strdup(ctx, password); - if (!ctx->password) { - return W_ERROR_V(WERR_NOT_ENOUGH_MEMORY); - } - ok = cli_credentials_set_password(ctx->creds, password, CRED_SPECIFIED); if (!ok) { return W_ERROR_V(WERR_INTERNAL_ERROR); diff --git a/source3/lib/netapi/netapi_private.h b/source3/lib/netapi/netapi_private.h index 3a1f8c48846..b590be952c4 100644 --- a/source3/lib/netapi/netapi_private.h +++ b/source3/lib/netapi/netapi_private.h @@ -58,7 +58,6 @@ struct libnetapi_ctx { char *debuglevel; char *error_string; char *workgroup; - char *password; int use_kerberos; int use_ccache; int disable_policy_handle_cache;