summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc_shell.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-08-27 13:54:49 +0200
committerGünther Deschner <gd@samba.org>2008-08-29 13:57:59 +0200
commit7eb0b5e03708027cfa9d40a955e5b0480441c686 (patch)
treeeaa485e6cfbee06254c37f67fb815522d4baff66 /source3/utils/net_rpc_shell.c
parenta9a9772b5dbea06c21125738058c0a629c9d077d (diff)
downloadsamba-7eb0b5e03708027cfa9d40a955e5b0480441c686.tar.gz
samba-7eb0b5e03708027cfa9d40a955e5b0480441c686.tar.bz2
samba-7eb0b5e03708027cfa9d40a955e5b0480441c686.zip
net: now that "net rpc user" uses netapi calls exclusivly, net rpc shell needs
to use netapi as well. Guenther (This used to be commit 2f730649b73dcd11734d12921bfdad982fe75717)
Diffstat (limited to 'source3/utils/net_rpc_shell.c')
-rw-r--r--source3/utils/net_rpc_shell.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/utils/net_rpc_shell.c b/source3/utils/net_rpc_shell.c
index c6051dc976..3aaed1ed18 100644
--- a/source3/utils/net_rpc_shell.c
+++ b/source3/utils/net_rpc_shell.c
@@ -217,6 +217,15 @@ int net_rpc_shell(struct net_context *c, int argc, const char **argv)
return -1;
}
+ if (libnetapi_init(&c->netapi_ctx) != 0) {
+ return -1;
+ }
+ libnetapi_set_username(c->netapi_ctx, c->opt_user_name);
+ libnetapi_set_password(c->netapi_ctx, c->opt_password);
+ if (c->opt_kerberos) {
+ libnetapi_set_use_kerberos(c->netapi_ctx);
+ }
+
ctx = TALLOC_P(NULL, struct rpc_sh_ctx);
if (ctx == NULL) {
d_fprintf(stderr, "talloc failed\n");