Fixed some 64bit platform issues.
This commit is contained in:
parent
1dd90307b7
commit
53d06963fc
@ -125,7 +125,7 @@ CasaStatus SSCS_CALL
|
||||
AuthTokenIf_GetAuthToken(
|
||||
IN const void *pIfInstance,
|
||||
IN const char *pContext,
|
||||
IN char *pMechInfo,
|
||||
IN const char *pMechInfo,
|
||||
IN const char *pHostName,
|
||||
IN void *pCredStoreScope,
|
||||
INOUT char *pTokenBuf,
|
||||
@ -213,31 +213,52 @@ AuthTokenIf_GetAuthToken(
|
||||
// Process any mechanism information that may have been provided
|
||||
if (pMechInfo)
|
||||
{
|
||||
// Mechanism information has been provided. Mechanism information
|
||||
// consists of semicolon delimited settings. The settings are formated
|
||||
// using the format settingName=settingvalue. No white space is allowed
|
||||
// as part of the mechanism information.
|
||||
char *pNextSettingToken;
|
||||
char *pSettingValueToken = strtok_r(pMechInfo, ";", &pNextSettingToken);
|
||||
while (pSettingValueToken != NULL)
|
||||
// Allocate a buffer to hold the mech info so that we can manipulate it
|
||||
char *pMechInfoInt = malloc(strlen(pMechInfo) + 1);
|
||||
if (pMechInfoInt)
|
||||
{
|
||||
char *pNextToken;
|
||||
char *pSettingName = strtok_r(pSettingValueToken, "=", &pNextToken);
|
||||
char *pSettingValue = strtok_r(NULL, "=", &pNextToken);
|
||||
if (pSettingValue)
|
||||
char *pNextSettingToken;
|
||||
char *pSettingValueToken;
|
||||
|
||||
// Copy the mechanism info to our work buffer
|
||||
strcpy(pMechInfoInt, pMechInfo);
|
||||
|
||||
// Mechanism information has been provided. Mechanism information
|
||||
// consists of semicolon delimited settings. The settings are formated
|
||||
// using the format settingName=settingvalue. No white space is allowed
|
||||
// as part of the mechanism information.
|
||||
pSettingValueToken = strtok_r(pMechInfoInt, ";", &pNextSettingToken);
|
||||
while (pSettingValueToken != NULL)
|
||||
{
|
||||
// Process the setting
|
||||
if (strcasecmp(pSettingName, "SVC_PRINCIPAL") == 0)
|
||||
char *pNextToken;
|
||||
char *pSettingName = strtok_r(pSettingValueToken, "=", &pNextToken);
|
||||
char *pSettingValue = strtok_r(NULL, "=", &pNextToken);
|
||||
if (pSettingValue)
|
||||
{
|
||||
pKrbServiceName = pSettingValue;
|
||||
// Process the setting
|
||||
if (strcasecmp(pSettingName, "SVC_PRINCIPAL") == 0)
|
||||
{
|
||||
pKrbServiceName = pSettingValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DbgTrace(0, "-AuthTokenIf_GetAuthToken- Bad setting\n", 0);
|
||||
else
|
||||
{
|
||||
DbgTrace(0, "-AuthTokenIf_GetAuthToken- Bad setting\n", 0);
|
||||
}
|
||||
|
||||
pSettingValueToken = strtok_r(NULL, ";", &pNextSettingToken);
|
||||
}
|
||||
|
||||
pSettingValueToken = strtok_r(NULL, ";", &pNextSettingToken);
|
||||
// Free the buffer that we allocated
|
||||
free(pMechInfoInt);
|
||||
}
|
||||
else
|
||||
{
|
||||
DbgTrace(0, "-AuthTokenIf_GetAuthToken- Buffer allocation failure\n", 0);
|
||||
retStatus = CasaStatusBuild(CASA_SEVERITY_ERROR,
|
||||
CASA_FACILITY_PWTOKEN,
|
||||
CASA_STATUS_INVALID_PARAMETER);
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,16 +122,16 @@ AuthTokenIf_GetAuthToken(
|
||||
// Process any mechanism information that may have been provided
|
||||
if (pMechInfo)
|
||||
{
|
||||
// Allocate a buffer to hold the mech info so that we can manipulate it
|
||||
char *pMechInfoInt = malloc(strlen(pMechInfo) + 1);
|
||||
if (pMechInfoInt)
|
||||
{
|
||||
// Allocate a buffer to hold the mech info so that we can manipulate it
|
||||
char *pMechInfoInt = malloc(strlen(pMechInfo) + 1);
|
||||
if (pMechInfoInt)
|
||||
{
|
||||
char *pNextSettingToken;
|
||||
char *pSettingValueToken;
|
||||
|
||||
// Copy the mechanism info to our work buffer
|
||||
strcpy(pMechInfoInt, pMechInfo);
|
||||
|
||||
// Copy the mechanism info to our work buffer
|
||||
strcpy(pMechInfoInt, pMechInfo);
|
||||
|
||||
// Mechanism information has been provided. Mechanism information
|
||||
// consists of semicolon delimited settings. The settings are formated
|
||||
// using the format settingName=settingvalue. No white space is allowed
|
||||
@ -157,18 +157,18 @@ AuthTokenIf_GetAuthToken(
|
||||
|
||||
pSettingValueToken = strtok_r(NULL, ";", &pNextSettingToken);
|
||||
}
|
||||
|
||||
// Free the buffer that we allocated
|
||||
free(pMechInfoInt);
|
||||
}
|
||||
else
|
||||
{
|
||||
DbgTrace(0, "-AuthTokenIf_GetAuthToken- Buffer allocation failure\n", 0);
|
||||
retStatus = CasaStatusBuild(CASA_SEVERITY_ERROR,
|
||||
CASA_FACILITY_PWTOKEN,
|
||||
CASA_STATUS_INVALID_PARAMETER);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
// Free the buffer that we allocated
|
||||
free(pMechInfoInt);
|
||||
}
|
||||
else
|
||||
{
|
||||
DbgTrace(0, "-AuthTokenIf_GetAuthToken- Buffer allocation failure\n", 0);
|
||||
retStatus = CasaStatusBuild(CASA_SEVERITY_ERROR,
|
||||
CASA_FACILITY_PWTOKEN,
|
||||
CASA_STATUS_INVALID_PARAMETER);
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Check if we need to construct the service name
|
||||
|
@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 2 17:13:28 MDT 2007 - jluciani@novell.com
|
||||
|
||||
- Cleaned up 64bit platform issues.
|
||||
|
||||
- Fixed BUG245588 which dealt with the devel package windows
|
||||
install.
|
||||
|
||||
- Fixed BUG258123 which dealt with recovery from errors in a
|
||||
multi-ATS environment using the same REALMS.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 21 17:16:22 MDT 2007 - jluciani@novell.com
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user