diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-14 20:00:32 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-04-14 20:00:32 +0200 |
commit | 18f8f5d6561d50b9179541ea24e03a5a807a2a2a (patch) | |
tree | 4759b1bc65e703213178d7ab4ef7c1a80e713161 /source4/utils/net/net_join.c | |
parent | a15b6f1606e1c761c2c4037b734137e97f00489f (diff) | |
parent | 68a2c547d00d7a8d0c15744172489d9d010c31a3 (diff) | |
download | samba-18f8f5d6561d50b9179541ea24e03a5a807a2a2a.tar.gz samba-18f8f5d6561d50b9179541ea24e03a5a807a2a2a.tar.bz2 samba-18f8f5d6561d50b9179541ea24e03a5a807a2a2a.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-gmake4
(This used to be commit 1ef3830bb0d6e91e3b00e880784ca0741d9b4d49)
Diffstat (limited to 'source4/utils/net/net_join.c')
-rw-r--r-- | source4/utils/net/net_join.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/utils/net/net_join.c b/source4/utils/net/net_join.c index abdcbf6027..2102257c6c 100644 --- a/source4/utils/net/net_join.c +++ b/source4/utils/net/net_join.c @@ -24,6 +24,7 @@ #include "libnet/libnet.h" #include "libcli/security/security.h" #include "param/param.h" +#include "lib/events/events.h" int net_join(struct net_context *ctx, int argc, const char **argv) { @@ -38,10 +39,10 @@ int net_join(struct net_context *ctx, int argc, const char **argv) case 0: /* no args -> fail */ return net_join_usage(ctx, argc, argv); case 1: /* only DOMAIN */ - tmp = talloc_strdup(ctx->mem_ctx, argv[0]); + tmp = talloc_strdup(ctx, argv[0]); break; case 2: /* DOMAIN and role */ - tmp = talloc_strdup(ctx->mem_ctx, argv[0]); + tmp = talloc_strdup(ctx, argv[0]); if (strcasecmp(argv[1], "BDC") == 0) { secure_channel_type = SEC_CHAN_BDC; } else if (strcasecmp(argv[1], "MEMBER") == 0) { @@ -57,12 +58,12 @@ int net_join(struct net_context *ctx, int argc, const char **argv) domain_name = tmp; - libnetctx = libnet_context_init(NULL, ctx->lp_ctx); + libnetctx = libnet_context_init(event_context_find(ctx), ctx->lp_ctx); if (!libnetctx) { return -1; } libnetctx->cred = ctx->credentials; - r = talloc(ctx->mem_ctx, struct libnet_Join); + r = talloc(ctx, struct libnet_Join); if (!r) { return -1; } @@ -83,7 +84,7 @@ int net_join(struct net_context *ctx, int argc, const char **argv) talloc_free(libnetctx); return -1; } - d_printf("Joined domain %s (%s)\n", r->out.domain_name, dom_sid_string(ctx->mem_ctx, r->out.domain_sid)); + d_printf("Joined domain %s (%s)\n", r->out.domain_name, dom_sid_string(ctx, r->out.domain_sid)); talloc_free(libnetctx); return 0; |