diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-09-28 05:38:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:39:06 -0500 |
commit | 2ca10397af6f5680f99997d9f92cd6356816376d (patch) | |
tree | 15cee0bd7679d7f6f39f1e6317e7c40acf482f91 /source4 | |
parent | 718dd6dda6331b27b8f4fc89b891c27124c7821e (diff) | |
download | samba-2ca10397af6f5680f99997d9f92cd6356816376d.tar.gz samba-2ca10397af6f5680f99997d9f92cd6356816376d.tar.bz2 samba-2ca10397af6f5680f99997d9f92cd6356816376d.zip |
r10566: Clean up error messages to provide more accurate info.
Andrew Bartlett
(This used to be commit 640815008b78ca19a73beb523e6823dd61feffa5)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libnet/libnet_join.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c index 3edad64259..166b6a730d 100644 --- a/source4/libnet/libnet_join.c +++ b/source4/libnet/libnet_join.c @@ -613,9 +613,15 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru status = libnet_RpcConnect(ctx, c, c); if (!NT_STATUS_IS_OK(status)) { - r->out.error_string = talloc_asprintf(mem_ctx, - "Connection to LSA pipe of PDC of domain '%s' failed: %s", - r->in.domain_name, nt_errstr(status)); + if (r->in.level == LIBNET_JOINDOMAIN_AUTOMATIC) { + r->out.error_string = talloc_asprintf(mem_ctx, + "Connection to LSA pipe of PDC of domain '%s' failed: %s", + r->in.domain_name, nt_errstr(status)); + } else { + r->out.error_string = talloc_asprintf(mem_ctx, + "Connection to LSA pipe with binding '%s' failed: %s", + r->in.binding, nt_errstr(status)); + } talloc_free(tmp_ctx); return status; } @@ -835,9 +841,8 @@ NTSTATUS libnet_JoinDomain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, stru r->out.error_string = talloc_asprintf(mem_ctx, "samr_LookupNames for [%s] returns %d RIDs\n", r->in.account_name, ln.out.rids.count); - status = NT_STATUS_INVALID_PARAMETER; talloc_free(tmp_ctx); - return status; + return NT_STATUS_INVALID_PARAMETER; } /* prepare samr_OpenUser */ |