summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-07-31 15:14:14 +0200
committerGünther Deschner <gd@samba.org>2008-07-31 15:26:15 +0200
commit52a850151548aef12d59bb2fa8569d17cf776fc8 (patch)
tree374c4da27accc543e72b88e6f0528d18b8e77bcf
parent23e9ebb0d48b3005ecad3e5ef47e2c696f64d39d (diff)
downloadsamba-52a850151548aef12d59bb2fa8569d17cf776fc8.tar.gz
samba-52a850151548aef12d59bb2fa8569d17cf776fc8.tar.bz2
samba-52a850151548aef12d59bb2fa8569d17cf776fc8.zip
netapi: when using NetApi functions forward net's kerberos setting.
Guenther (This used to be commit d46f648d2e25ad712138f02e5060288278f4c1b1)
-rw-r--r--source3/utils/net_dom.c3
-rw-r--r--source3/utils/net_rpc.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/source3/utils/net_dom.c b/source3/utils/net_dom.c
index 6b8185a31d..f13b9c23d0 100644
--- a/source3/utils/net_dom.c
+++ b/source3/utils/net_dom.c
@@ -257,6 +257,9 @@ int net_dom(struct net_context *c, int argc, const char **argv)
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);
+ }
return net_run_function(c, argc, argv, "net dom", func);
}
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 730681cc74..347ddd039f 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -1243,6 +1243,9 @@ int net_rpc_user(struct net_context *c, int argc, const char **argv)
}
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);
+ }
if (argc == 0) {
if (c->display_usage) {
@@ -3062,6 +3065,9 @@ int net_rpc_group(struct net_context *c, int argc, const char **argv)
}
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);
+ }
if (argc == 0) {
if (c->display_usage) {