Fixed some build problems introduced with the mechanism_info changes.

This commit is contained in:
Juan Carlos Luciani
2007-03-21 23:05:34 +00:00
parent e1001dfc6f
commit 1d1803ffb6
6 changed files with 49 additions and 14 deletions

View File

@@ -39,7 +39,7 @@ CasaStatus SSCS_CALL
AuthTokenIf_GetAuthToken(
IN const void *pIfInstance,
IN const char *pContext,
IN const char *pMechInfo,
IN char *pMechInfo,
IN const char *pHostName,
IN void *pCredStoreScope,
INOUT char *pTokenBuf,
@@ -97,6 +97,7 @@ AuthTokenIf_GetAuthToken(
{
CasaStatus retStatus;
char *pKrbServiceName = NULL;
bool freeKrbSvcNameBuf = false;
SECURITY_STATUS secStatus;
TimeStamp expiry;
CredHandle hCredentials = {0};
@@ -130,8 +131,8 @@ AuthTokenIf_GetAuthToken(
while (pSettingValueToken != NULL)
{
char *pNextToken;
char *pSettingName = strtok_s(pSettingValueToken, "=", &pNextToken);
char *pSettingValue = strtok_s(NULL, "=", &pNextToken);
char *pSettingName = strtok_r(pSettingValueToken, "=", &pNextToken);
char *pSettingValue = strtok_r(NULL, "=", &pNextToken);
if (pSettingValue)
{
// Process the setting
@@ -157,6 +158,7 @@ AuthTokenIf_GetAuthToken(
pKrbServiceName = malloc(5 /*"host/"*/ + strlen(pHostName) + 1 /*'/0'*/);
if (pKrbServiceName)
{
freeKrbSvcNameBuf = true;
sprintf(pKrbServiceName, "host/%s", pHostName);
}
else
@@ -310,8 +312,7 @@ AuthTokenIf_GetAuthToken(
exit:
// Free buffer holding the Krb Service Name if necessary
if (pKrbServiceName
&& pKrbServiceName != pMechInfo)
if (freeKrbSvcNameBuf)
free(pKrbServiceName);
DbgTrace(1, "-AuthTokenIf_GetAuthToken- End, retStatus = %08X\n", retStatus);

View File

@@ -80,6 +80,7 @@ FILE *pDebugFile; \
#define bool BOOLEAN
#define true TRUE
#define false FALSE
#define strtok_r strtok_s
//===[ Inlines functions ]===============================================