]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:netapi: Remove password from 'struct libnetapi_ctx'
authorAndreas Schneider <asn@samba.org>
Thu, 18 Mar 2021 10:37:03 +0000 (11:37 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 24 Mar 2021 00:55:32 +0000 (00:55 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source3/lib/netapi/netapi.c
source3/lib/netapi/netapi_private.h

index 8d5c8c85f5aff3f7254d8245bf5a1b57ad55c91b..25983ced7ece60487168dc9a8c816ca6150f1ef3 100644 (file)
@@ -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);
index 3a1f8c488469b7ed2b83c26a37068009a12601bc..b590be952c43f77e9713100f41e01c344c74fde6 100644 (file)
@@ -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;