]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3-libnet: Print error string even on successfuly completion of libnetjoin.
authorGünther Deschner <gd@samba.org>
Wed, 15 Jun 2016 14:04:29 +0000 (16:04 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 22 Jun 2016 11:11:14 +0000 (13:11 +0200)
Sometimes useful information should be printed to the users.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11977

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 632faa87610b3afca3f8d3e9f3f46ee6b87f362a)

source3/utils/net_ads.c
source3/utils/net_rpc.c

index 5ed31296322fc27dd0c17dfb7ec65b99e73b48d2..e0a204ba0e37109ce62e7ea041ec9c3cb8562848 100644 (file)
@@ -1587,6 +1587,11 @@ int net_ads_join(struct net_context *c, int argc, const char **argv)
                        r->out.netbios_domain_name);
        }
 
+       /* print out informative error string in case there is one */
+       if (r->out.error_string != NULL) {
+               d_printf("%s\n", r->out.error_string);
+       }
+
        /*
         * We try doing the dns update (if it was compiled in).
         * If the dns update fails, we still consider the join
index 93caf04681384703d5eff041a51d612e8f0a8617..1e3e2866ae43ca4c50a95c8509631b0416ad0639 100644 (file)
@@ -428,6 +428,11 @@ static int net_rpc_oldjoin(struct net_context *c, int argc, const char **argv)
                        r->out.netbios_domain_name);
        }
 
+       /* print out informative error string in case there is one */
+       if (r->out.error_string != NULL) {
+               d_printf("%s\n", r->out.error_string);
+       }
+
        TALLOC_FREE(mem_ctx);
 
        return 0;
@@ -607,6 +612,11 @@ static int net_rpc_join_newstyle(struct net_context *c, int argc, const char **a
                        r->out.netbios_domain_name);
        }
 
+       /* print out informative error string in case there is one */
+       if (r->out.error_string != NULL) {
+               d_printf("%s\n", r->out.error_string);
+       }
+
        TALLOC_FREE(mem_ctx);
 
        return 0;