summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-07-30 21:38:21 +0200
committerGünther Deschner <gd@samba.org>2008-08-11 19:52:23 +0200
commit5bea31aa3c6a1e66496d6bb596b96977ba01457f (patch)
tree9ad2dfcdeba5153c547aeb1faddf029ff475127a /source3/utils
parent051cb1a4de1f089f61a82eec6cc485da6d02efa3 (diff)
downloadsamba-5bea31aa3c6a1e66496d6bb596b96977ba01457f.tar.gz
samba-5bea31aa3c6a1e66496d6bb596b96977ba01457f.tar.bz2
samba-5bea31aa3c6a1e66496d6bb596b96977ba01457f.zip
libnetjoin: support kerberized joining/unjoing (fix #5416).
Guenther (This used to be commit da6e0f4f375aa533c4c765891c960070478972eb)
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 934ac1da1e..7dbe518c3d 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -879,7 +879,9 @@ static int net_ads_leave(struct net_context *c, int argc, const char **argv)
return -1;
}
- use_in_memory_ccache();
+ if (!c->opt_kerberos) {
+ use_in_memory_ccache();
+ }
werr = libnet_init_UnjoinCtx(ctx, &r);
if (!W_ERROR_IS_OK(werr)) {
@@ -888,6 +890,7 @@ static int net_ads_leave(struct net_context *c, int argc, const char **argv)
}
r->in.debug = true;
+ r->in.use_kerberos = c->opt_kerberos;
r->in.dc_name = c->opt_host;
r->in.domain_name = lp_realm();
r->in.admin_account = c->opt_user_name;
@@ -1192,7 +1195,9 @@ int net_ads_join(struct net_context *c, int argc, const char **argv)
goto fail;
}
- use_in_memory_ccache();
+ if (!c->opt_kerberos) {
+ use_in_memory_ccache();
+ }
werr = libnet_init_JoinCtx(ctx, &r);
if (!W_ERROR_IS_OK(werr)) {
@@ -1250,6 +1255,7 @@ int net_ads_join(struct net_context *c, int argc, const char **argv)
r->in.admin_account = c->opt_user_name;
r->in.admin_password = net_prompt_pass(c, c->opt_user_name);
r->in.debug = true;
+ r->in.use_kerberos = c->opt_kerberos;
r->in.modify_config = modify_config;
r->in.join_flags = WKSSVC_JOIN_FLAGS_JOIN_TYPE |
WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE |