s3:net_ads: make use of ads_connect_no_bind() and ADS_AUTH_GENERATE_KRB5_CONFIG in...
authorStefan Metzmacher <metze@samba.org>
Thu, 29 Feb 2024 13:08:55 +0000 (14:08 +0100)
committerStefan Metzmacher <metze@samba.org>
Wed, 8 May 2024 08:17:06 +0000 (10:17 +0200)
We don't need a real ldap connection here.

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

index f78414509e1612ef890d485a3ff91adef5f87514..a7e49fbefd878550e0871ecc77015577cc7ea719 100644 (file)
@@ -2653,7 +2653,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_no_bind(ads);
 
        if (!ads->config.realm) {
                d_fprintf(stderr, _("Didn't find the kerberos server!\n"));