diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-08-29 04:30:22 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:34:54 -0500 |
commit | 24186a80eb4887b5fb3e72e4b877b456cbe8e35f (patch) | |
tree | 4f5b7d9147ec0b450ca0da5023113c8c5aad2182 /source4/utils | |
parent | 1a316fd8c50e501b5d69bb47ff5d1d483b02b04e (diff) | |
download | samba-24186a80eb4887b5fb3e72e4b877b456cbe8e35f.tar.gz samba-24186a80eb4887b5fb3e72e4b877b456cbe8e35f.tar.bz2 samba-24186a80eb4887b5fb3e72e4b877b456cbe8e35f.zip |
r9728: A *major* update to the credentials system, to incorporate the
Kerberos CCACHE into the system.
This again allows the use of the system ccache when no username is
specified, and brings more code in common between gensec_krb5 and
gensec_gssapi.
It also has a side-effect that may (or may not) be expected: If there
is a ccache, even if it is not used (perhaps the remote server didn't
want kerberos), it will change the default username.
Andrew Bartlett
(This used to be commit 6202267f6ec1446d6bd11d1d37d05a977bc8d315)
Diffstat (limited to 'source4/utils')
-rw-r--r-- | source4/utils/net/net_password.c | 4 | ||||
-rw-r--r-- | source4/utils/ntlm_auth.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/source4/utils/net/net_password.c b/source4/utils/net/net_password.c index 1912beeb41..0bfb8a5be8 100644 --- a/source4/utils/net/net_password.c +++ b/source4/utils/net/net_password.c @@ -49,7 +49,7 @@ static int net_password_change(struct net_context *ctx, int argc, const char **a } else { password_prompt = talloc_asprintf(ctx->mem_ctx, "Enter new password for account [%s\\%s]:", cli_credentials_get_domain(ctx->credentials), - cli_credentials_get_username(ctx->credentials)); + cli_credentials_get_username(ctx->credentials, ctx->mem_ctx)); new_password = getpass(password_prompt); } @@ -61,7 +61,7 @@ static int net_password_change(struct net_context *ctx, int argc, const char **a /* prepare password change */ r.generic.level = LIBNET_CHANGE_PASSWORD_GENERIC; - r.generic.in.account_name = cli_credentials_get_username(ctx->credentials); + r.generic.in.account_name = cli_credentials_get_username(ctx->credentials, ctx->mem_ctx); r.generic.in.domain_name = cli_credentials_get_domain(ctx->credentials); r.generic.in.oldpassword = cli_credentials_get_password(ctx->credentials); r.generic.in.newpassword = new_password; diff --git a/source4/utils/ntlm_auth.c b/source4/utils/ntlm_auth.c index 7e1ca011e4..b10d4af6ce 100644 --- a/source4/utils/ntlm_auth.c +++ b/source4/utils/ntlm_auth.c @@ -349,8 +349,6 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode, cli_credentials_set_conf(creds); if (opt_username) { cli_credentials_set_username(creds, opt_username, CRED_SPECIFIED); - } else { - cli_credentials_set_username(creds, "", CRED_GUESSED); } if (opt_domain) { cli_credentials_set_domain(creds, opt_domain, CRED_SPECIFIED); |