From f16adeb6275fc117fbce2b41c3c74f937ca3ed7b Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 23 Aug 2010 14:49:56 +0000 Subject: [PATCH] -Consistently use same krb credential cache for all operations git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7189 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/activedirectory.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/activedirectory.pm b/xCAT-server/lib/xcat/plugins/activedirectory.pm index cbbf5a655..2004c6d2d 100644 --- a/xCAT-server/lib/xcat/plugins/activedirectory.pm +++ b/xCAT-server/lib/xcat/plugins/activedirectory.pm @@ -85,6 +85,7 @@ sub process_request { xCAT::SvrUtils::sendmsg([1,"Unable to determine domain from arguments or site table"], $callback); return undef; } + $ENV{KRB5CCNAME}="/tmp/xcat/krbcache.$realm.$$"; my $err = xCAT::ADUtils::krb_login(username=>$adpent->{username},password=>$adpent->{password},realm=>$realm); if ($err) { xCAT::SvrUtils::sendmsg([1,"Error authenticating to Active Directory"], $callback); @@ -115,6 +116,7 @@ sub process_request { xCAT::SvrUtils::sendmsg([1,"Unable to determine domain from arguments or site table"], $callback); return undef; } + $ENV{KRB5CCNAME}="/tmp/xcat/krbcache.$realm.$$"; my $err = xCAT::ADUtils::krb_login(username=>$adpent->{username},password=>$adpent->{password},realm=>$realm); if ($err) { xCAT::SvrUtils::sendmsg([1,"Error authenticating to Active Directory"], $callback); @@ -239,6 +241,7 @@ sub process_request { $realm = uc($domain); $realm =~ s/\.$//; #remove trailing dot if provided } + $ENV{KRB5CCNAME}="/tmp/xcat/krbcache.$realm.$$"; my $err = xCAT::ADUtils::krb_login(username=>$adpent->{username},password=>$adpent->{password},realm=>$realm); if ($err) { @@ -295,6 +298,7 @@ sub process_request { $realm = uc($domain); $realm =~ s/\.$//; #remove trailing dot if provided } + $ENV{KRB5CCNAME}="/tmp/xcat/krbcache.$realm.$$"; unless ($loggedrealms{$realm}) { my $err = xCAT::ADUtils::krb_login(username=>$adpent->{username},password=>$adpent->{password},realm=>$realm); if ($err) {