Fixed some build problems introduced with the mechanism_info changes.
This commit is contained in:
		| @@ -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); | ||||
|   | ||||
| @@ -80,6 +80,7 @@ FILE  *pDebugFile;                                               \ | ||||
| #define bool BOOLEAN | ||||
| #define true TRUE | ||||
| #define false FALSE | ||||
| #define strtok_r strtok_s | ||||
|  | ||||
| //===[ Inlines functions   ]=============================================== | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user