diff options
author | Jim McDonough <jmcd@samba.org> | 2002-01-25 22:07:46 +0000 |
---|---|---|
committer | Jim McDonough <jmcd@samba.org> | 2002-01-25 22:07:46 +0000 |
commit | de260eadf956cae8aeaebc2a84f46a57c0671741 (patch) | |
tree | e501595e49162ed81b27bad864a58df29c5a84e4 /source3/libads | |
parent | 9d8ed7220fed8a3b7ff9d45b9c5902c3255956ac (diff) | |
download | samba-de260eadf956cae8aeaebc2a84f46a57c0671741.tar.gz samba-de260eadf956cae8aeaebc2a84f46a57c0671741.tar.bz2 samba-de260eadf956cae8aeaebc2a84f46a57c0671741.zip |
Enable net ads commands to use existing tickets if the user doesn't specify a username on the commandline. Also don't continue past the kinit if a password is entered and fails because existing tickets would be used, which may not be desired if the username was specified.
(This used to be commit 7e5d7dfa834c0161460bde8a2f0d4824c0a0d1fe)
Diffstat (limited to 'source3/libads')
-rw-r--r-- | source3/libads/ldap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index d922e4c7c5..d7d2163281 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -31,6 +31,7 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads) { int version = LDAP_VERSION3; + int code; ADS_STATUS status; ads->last_attempt = time(NULL); @@ -48,7 +49,8 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads) ldap_set_option(ads->ld, LDAP_OPT_PROTOCOL_VERSION, &version); if (ads->password) { - ads_kinit_password(ads); + if ((code = ads_kinit_password(ads))) + return ADS_ERROR_KRB5(code); } return ads_sasl_bind(ads); |