summaryrefslogtreecommitdiff
path: root/source3/rpc_server/wkssvc
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-09-21 17:28:58 +0200
committerGünther Deschner <gd@samba.org>2011-09-21 19:13:33 +0200
commit60d91f2c561fb3467a2cc73377f9ba9204ddd496 (patch)
tree50b9bc8ce9b31a6c90821d7e132a4a9f41aaca24 /source3/rpc_server/wkssvc
parenta9a81648e974b62e67fe42313ab32024d72d9007 (diff)
downloadsamba-60d91f2c561fb3467a2cc73377f9ba9204ddd496.tar.gz
samba-60d91f2c561fb3467a2cc73377f9ba9204ddd496.tar.bz2
samba-60d91f2c561fb3467a2cc73377f9ba9204ddd496.zip
s3-libnet: allow to use default krb5 ccache in libnet_Join/libnet_Unjoin.
We force using a MEMORY ccache though in the wkssvc server. Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Wed Sep 21 19:13:33 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3/rpc_server/wkssvc')
-rw-r--r--source3/rpc_server/wkssvc/srv_wkssvc_nt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/rpc_server/wkssvc/srv_wkssvc_nt.c b/source3/rpc_server/wkssvc/srv_wkssvc_nt.c
index 49c71b8d6e..e65aa499cf 100644
--- a/source3/rpc_server/wkssvc/srv_wkssvc_nt.c
+++ b/source3/rpc_server/wkssvc/srv_wkssvc_nt.c
@@ -32,6 +32,7 @@
#include "session.h"
#include "smbd/smbd.h"
#include "auth.h"
+#include "krb5_env.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
@@ -867,7 +868,9 @@ WERROR _wkssvc_NetrJoinDomain2(struct pipes_struct *p,
j->in.msg_ctx = p->msg_ctx;
become_root();
+ setenv(KRB5_ENV_CCNAME, "MEMORY:_wkssvc_NetrJoinDomain2", 1);
werr = libnet_Join(p->mem_ctx, j);
+ unsetenv(KRB5_ENV_CCNAME);
unbecome_root();
if (!W_ERROR_IS_OK(werr)) {
@@ -933,7 +936,9 @@ WERROR _wkssvc_NetrUnjoinDomain2(struct pipes_struct *p,
u->in.msg_ctx = p->msg_ctx;
become_root();
+ setenv(KRB5_ENV_CCNAME, "MEMORY:_wkssvc_NetrUnjoinDomain2", 1);
werr = libnet_Unjoin(p->mem_ctx, u);
+ unsetenv(KRB5_ENV_CCNAME);
unbecome_root();
if (!W_ERROR_IS_OK(werr)) {