diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-04-14 19:32:42 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-04-14 19:32:42 +0200 |
commit | 68a2c547d00d7a8d0c15744172489d9d010c31a3 (patch) | |
tree | 54313b0dc50014015d680121fa750a5d4777c7a4 /source4/utils/net/net_user.c | |
parent | 2cdfaedee203a726bddfb46fb10d9604de32a05f (diff) | |
parent | 4f51b0246db3242ee02ee16905cba13a5dc5633a (diff) | |
download | samba-68a2c547d00d7a8d0c15744172489d9d010c31a3.tar.gz samba-68a2c547d00d7a8d0c15744172489d9d010c31a3.tar.bz2 samba-68a2c547d00d7a8d0c15744172489d9d010c31a3.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit 0f0c8519b87481e3473a469cefd51c76b4a7632e)
Diffstat (limited to 'source4/utils/net/net_user.c')
-rw-r--r-- | source4/utils/net/net_user.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source4/utils/net/net_user.c b/source4/utils/net/net_user.c index 39d50e7d8b..57cef6b383 100644 --- a/source4/utils/net/net_user.c +++ b/source4/utils/net/net_user.c @@ -21,6 +21,7 @@ #include "includes.h" #include "utils/net/net.h" #include "libnet/libnet.h" +#include "lib/events/events.h" #include "auth/credentials/credentials.h" static int net_user_add(struct net_context *ctx, int argc, const char **argv) @@ -36,14 +37,14 @@ static int net_user_add(struct net_context *ctx, int argc, const char **argv) return net_user_usage(ctx, argc, argv); break; case 1: - user_name = talloc_strdup(ctx->mem_ctx, argv[0]); + user_name = talloc_strdup(ctx, argv[0]); break; default: return net_user_usage(ctx, argc, argv); } /* libnet context init and its params */ - lnet_ctx = libnet_context_init(NULL, ctx->lp_ctx); + lnet_ctx = libnet_context_init(event_context_find(ctx), ctx->lp_ctx); if (!lnet_ctx) return -1; lnet_ctx->cred = ctx->credentials; @@ -52,7 +53,7 @@ static int net_user_add(struct net_context *ctx, int argc, const char **argv) r.in.user_name = user_name; r.in.domain_name = cli_credentials_get_domain(lnet_ctx->cred); - status = libnet_CreateUser(lnet_ctx, ctx->mem_ctx, &r); + status = libnet_CreateUser(lnet_ctx, ctx, &r); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("Failed to add user account: %s\n", r.out.error_string)); @@ -76,14 +77,14 @@ static int net_user_delete(struct net_context *ctx, int argc, const char **argv) return net_user_usage(ctx, argc, argv); break; case 1: - user_name = talloc_strdup(ctx->mem_ctx, argv[0]); + user_name = talloc_strdup(ctx, argv[0]); break; default: return net_user_usage(ctx, argc, argv); } /* libnet context init and its params */ - lnet_ctx = libnet_context_init(NULL, ctx->lp_ctx); + lnet_ctx = libnet_context_init(event_context_find(ctx), ctx->lp_ctx); if (!lnet_ctx) return -1; lnet_ctx->cred = ctx->credentials; @@ -92,7 +93,7 @@ static int net_user_delete(struct net_context *ctx, int argc, const char **argv) r.in.user_name = user_name; r.in.domain_name = cli_credentials_get_domain(lnet_ctx->cred); - status = libnet_DeleteUser(lnet_ctx, ctx->mem_ctx, &r); + status = libnet_DeleteUser(lnet_ctx, ctx, &r); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("Failed to delete user account: %s\n", r.out.error_string)); |