summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2016-06-15 16:04:29 +0200
committerGünther Deschner <gd@samba.org>2016-06-15 16:31:17 +0200
commit632faa87610b3afca3f8d3e9f3f46ee6b87f362a (patch)
tree601dea60bad016c63ff4c48443ce1395dc84eb57
parent169e8aeda5e9d851ec818b5c2543ec59c8bc0c31 (diff)
downloadsamba-632faa87610b3afca3f8d3e9f3f46ee6b87f362a.tar.gz
s3-libnet: Print error string even on successfuly completion of libnetjoin.
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>
-rw-r--r--source3/utils/net_ads.c5
-rw-r--r--source3/utils/net_rpc.c10
2 files changed, 15 insertions, 0 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index d565df12892..f4c25e1bf17 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -1599,6 +1599,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
* and if it was not disabled on the command line).
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 93caf046813..1e3e2866ae4 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -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;