Multiple changes for Bug #543064

1. Provided SetATSHostList() API for changing the ATS address dynamically
2. Not using CASA enabled server as ATS. ATS address has to be explicitly set
   in client.conf or through SetATSHostList()
3. Not normalizing CASA enabled server's host name while obtaining CASA tokens.
   Callers of ObtainAuthTokenEx() have to pass normalized name as argument
This commit is contained in:
S Rahul
2009-10-09 08:46:35 +00:00
parent d1bfab390c
commit b9fa3eab0c
5 changed files with 143 additions and 135 deletions

View File

@@ -60,6 +60,12 @@ namespace Novell.Casa.Client.Auth
[In, Out] ref int iTokenLength
);
[DllImport(AUTH_LIBRARY, EntryPoint="SetATSHostList", CharSet=CharSet.None) ]
private static extern int _SetATSHostList
(
[In] String[] ATSHostList
);
[DllImport(AUTH_LIBRARY, CharSet=CharSet.None) ]
private static extern int ObtainAuthTokenEx
(
@@ -195,6 +201,21 @@ namespace Novell.Casa.Client.Auth
}
}
public static int SetATSHostList(string[] ATSHostList)
{
int i, numHosts;
string[] hostList;
/* Null termination */
numHosts = ATSHostList.Length;
hostList = new string[numHosts + 1];
for (i = 0; i < numHosts; i++) {
hostList[i] = ATSHostList[i];
}
return _SetATSHostList(hostList);
}
public static void CleanUpAuthTokenCache(WinLuid luid)
{
SSCS_EXT_T ext = new SSCS_EXT_T();