diff options
author | Andrew Bartlett <abartlet@samba.org> | 2014-09-23 14:19:35 -0700 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-10-17 12:57:07 +0200 |
commit | 2b9d6d3d9b6766ba2e48523b005a7eecf3e05412 (patch) | |
tree | 6abb21fc8ecb84fe7953d742ba9104063ea5d220 /source3/libsmb/clientgen.c | |
parent | 07bd866f59f8a6a29521fbf0e17963aaef8575de (diff) | |
download | samba-2b9d6d3d9b6766ba2e48523b005a7eecf3e05412.tar.gz |
s3:libsmb: Remove unused password copy stored in cli_state
Change-Id: Ia6b33a25628ae08be8a8c6baeb71ce390315cb45
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/libsmb/clientgen.c')
-rw-r--r-- | source3/libsmb/clientgen.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 71ec1dcc99a..1f03560f8a6 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -89,29 +89,11 @@ NTSTATUS cli_set_username(struct cli_state *cli, const char *username) return NT_STATUS_OK; } -NTSTATUS cli_set_password(struct cli_state *cli, const char *password) -{ - TALLOC_FREE(cli->password); - - /* Password can be NULL. */ - if (password) { - cli->password = talloc_strdup(cli, password); - if (cli->password == NULL) { - return NT_STATUS_NO_MEMORY; - } - } else { - /* Use zero NTLMSSP hashes and session key. */ - cli->password = NULL; - } - - return NT_STATUS_OK; -} - /**************************************************************************** Initialise credentials of a client structure. ****************************************************************************/ -NTSTATUS cli_init_creds(struct cli_state *cli, const char *username, const char *domain, const char *password) +NTSTATUS cli_init_creds(struct cli_state *cli, const char *username, const char *domain) { NTSTATUS status = cli_set_username(cli, username); if (!NT_STATUS_IS_OK(status)) { @@ -123,7 +105,7 @@ NTSTATUS cli_init_creds(struct cli_state *cli, const char *username, const char } DEBUG(10,("cli_init_creds: user %s domain %s\n", cli->user_name, cli->domain)); - return cli_set_password(cli, password); + return NT_STATUS_OK; } /**************************************************************************** |