s3-net: use generated krb5.conf in 'net ads testjoin'
authorGünther Deschner <gd@samba.org>
Wed, 16 Dec 2009 20:22:50 +0000 (21:22 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 23 Dec 2009 09:57:22 +0000 (10:57 +0100)
Guenther

source3/utils/net_ads.c

index f133eec0fc19b5150d9c19a7fe0ed1c1db54b2ef..8e644bb6b2c2ebe2be9b0c913a15700a7942ec7c 100644 (file)
@@ -1007,6 +1007,8 @@ static NTSTATUS net_ads_join_ok(struct net_context *c)
 {
        ADS_STRUCT *ads = NULL;
        ADS_STATUS status;
+       fstring dc_name;
+       struct sockaddr_storage dcip;
 
        if (!secrets_init()) {
                DEBUG(1,("Failed to initialise secrets database\n"));
@@ -1015,6 +1017,8 @@ static NTSTATUS net_ads_join_ok(struct net_context *c)
 
        net_use_krb_machine_account(c);
 
+       get_dc_name(lp_workgroup(), lp_realm(), dc_name, &dcip);
+
        status = ads_startup(c, true, &ads);
        if (!ADS_ERR_OK(status)) {
                return ads_ntstatus(status);