diff options
author | Volker Lendecke <vl@samba.org> | 2011-02-26 17:53:16 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-04-12 13:24:24 +0200 |
commit | feb3cdee366a439e8526f439714c9068068cdaa4 (patch) | |
tree | b6ffbdf5219d968109ab111ba791bee490c7bdcb | |
parent | 510e61871c0c2b2659b80d5f785522184131b1d9 (diff) | |
download | samba-feb3cdee366a439e8526f439714c9068068cdaa4.tar.gz samba-feb3cdee366a439e8526f439714c9068068cdaa4.tar.bz2 samba-feb3cdee366a439e8526f439714c9068068cdaa4.zip |
s3: Retry the join with the short name
Signed-off-by: Günther Deschner <gd@samba.org>
-rw-r--r-- | source3/utils/net_ads.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index e6ac1c9f86..ca5c1bffd7 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -1412,6 +1412,11 @@ int net_ads_join(struct net_context *c, int argc, const char **argv) r->in.msg_ctx = c->msg_ctx; werr = libnet_Join(ctx, r); + if (W_ERROR_EQUAL(werr, WERR_DCNOTFOUND) && + strequal(domain, lp_realm())) { + r->in.domain_name = lp_workgroup(); + werr = libnet_Join(ctx, r); + } if (!W_ERROR_IS_OK(werr)) { goto fail; } |