port latest changes from SAMBA_3_0 tree
[samba.git] / source3 / utils / net_ads.c
index 69d282420d91acd7dd1af53f4f568ed6a209fad0..631e235127559a6d06c035e5f8ab05da413eab8a 100644 (file)
@@ -68,7 +68,7 @@ static int net_ads_lookup(int argc, const char **argv)
 {
        ADS_STRUCT *ads;
 
-       ads = ads_init(NULL, NULL, opt_host);
+       ads = ads_init(NULL, opt_target_workgroup, opt_host);
        if (ads) {
                ads->auth.flags |= ADS_AUTH_NO_BIND;
        }
@@ -89,7 +89,7 @@ static int net_ads_info(int argc, const char **argv)
 {
        ADS_STRUCT *ads;
 
-       ads = ads_init(NULL, NULL, opt_host);
+       ads = ads_init(NULL, opt_target_workgroup, opt_host);
 
        if (ads) {
                ads->auth.flags |= ADS_AUTH_NO_BIND;
@@ -129,7 +129,7 @@ static ADS_STRUCT *ads_startup(void)
        BOOL second_time = False;
        char *cp;
        
-       ads = ads_init(NULL, NULL, opt_host);
+       ads = ads_init(NULL, opt_target_workgroup, opt_host);
 
        if (!opt_user_name) {
                opt_user_name = "administrator";
@@ -848,7 +848,7 @@ static int net_ads_printer_publish(int argc, const char **argv)
                                        opt_user_name, opt_workgroup,
                                        opt_password ? opt_password : "", 
                                        CLI_FULL_CONNECTION_USE_KERBEROS, 
-                                       NULL);
+                                       Undefined, NULL);
 
        if (NT_STATUS_IS_ERR(nt_status)) {
                d_printf("Unable to open a connnection to %s to obtain data "