]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:net_ads: make use of ads_connect_cldap_only() and ADS_AUTH_GENERATE_KRB5_CONFIG...
authorStefan Metzmacher <metze@samba.org>
Thu, 29 Feb 2024 13:08:55 +0000 (14:08 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 14 May 2024 10:18:31 +0000 (10:18 +0000)
We don't need a real ldap connection here.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/utils/net_ads.c

index 5f3c4bc151cab7600d99e19664213cae3f01359f..df8517d17445f734ff33698ac26d3708ed20f4d1 100644 (file)
@@ -2654,7 +2654,8 @@ static int net_ads_password(struct net_context *c, int argc, const char **argv)
 
        /* we don't actually need a full connect, but it's the easy way to
                fill in the KDC's address */
-       ads_connect(ads);
+       ads->auth.flags |= ADS_AUTH_GENERATE_KRB5_CONFIG;
+       ads_connect_cldap_only(ads);
 
        if (!ads->config.realm) {
                d_fprintf(stderr, _("Didn't find the kerberos server!\n"));