From 6cec8025b05595d60c23d70f34db9e65ca21b89d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 29 Jul 2005 10:58:05 +0000 Subject: r8847: Rework the Samba4 'net join' code. I'm trying to get this closer to what WinXP does when joining an AD domain, but in the meantime this removes the excess unions, and uses the LSA pipe in same way XP does. Andrew Bartlett (This used to be commit d2789c426090c325f6535cdce380ac0f4e22c3c7) --- source4/utils/net/net_join.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'source4/utils') diff --git a/source4/utils/net/net_join.c b/source4/utils/net/net_join.c index 7f9ab0c635..a1455ef036 100644 --- a/source4/utils/net/net_join.c +++ b/source4/utils/net/net_join.c @@ -29,7 +29,7 @@ int net_join(struct net_context *ctx, int argc, const char **argv) { NTSTATUS status; struct libnet_context *libnetctx; - union libnet_Join r; + struct libnet_Join r; char *tmp; const char *domain_name; enum netr_SchannelType secure_channel_type = SEC_CHAN_WKSTA; @@ -64,17 +64,16 @@ int net_join(struct net_context *ctx, int argc, const char **argv) libnetctx->cred = ctx->credentials; /* prepare password change */ - r.generic.level = LIBNET_JOIN_GENERIC; - r.generic.in.domain_name = domain_name; - r.generic.in.secure_channel_type = secure_channel_type; - r.generic.out.error_string = NULL; + r.in.domain_name = domain_name; + r.in.secure_channel_type = secure_channel_type; + r.out.error_string = NULL; /* do the domain join */ status = libnet_Join(libnetctx, ctx->mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("libnet_Join returned %s: %s\n", nt_errstr(status), - r.generic.out.error_string)); + r.out.error_string)); return -1; } -- cgit