summaryrefslogtreecommitdiff
path: root/source4/utils
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-07-29 10:58:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:30:11 -0500
commit6cec8025b05595d60c23d70f34db9e65ca21b89d (patch)
tree8fb95113e43382e120487b0284dc45508c0d428f /source4/utils
parent9cae22604b5d885ba033c44c41add421151ebaa6 (diff)
downloadsamba-6cec8025b05595d60c23d70f34db9e65ca21b89d.tar.gz
samba-6cec8025b05595d60c23d70f34db9e65ca21b89d.tar.bz2
samba-6cec8025b05595d60c23d70f34db9e65ca21b89d.zip
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)
Diffstat (limited to 'source4/utils')
-rw-r--r--source4/utils/net/net_join.c11
1 files changed, 5 insertions, 6 deletions
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;
}