Fixed issues found when testing the auth.policy mechanism_info changes
for the Krb5 and the Pwd mechanisms using a linux client.
This commit is contained in:
		| @@ -119,36 +119,36 @@ AuthTokenIf_GetAuthToken( | ||||
|       goto exit; | ||||
|    } | ||||
|  | ||||
|    // 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) | ||||
|       { | ||||
|          char *pNextToken; | ||||
|          char *pSettingName = strtok_r(pSettingValueToken, "=", &pNextToken); | ||||
|          char *pSettingValue = strtok_r(NULL, "=", &pNextToken); | ||||
|          if (pSettingValue) | ||||
|          { | ||||
|             // Process the setting | ||||
|             if (strcmpi(pSettingName, "SVC_PRINCIPAL") == 0) | ||||
|             { | ||||
|                pKrbServiceName = pSettingValue; | ||||
|             } | ||||
|          } | ||||
|          else | ||||
|          { | ||||
|             printf("Bad setting\n"); | ||||
|          } | ||||
|  | ||||
|          pSettingValueToken = strtok_r(NULL, ";", &pNextSettingToken); | ||||
|       } | ||||
|    } | ||||
|    // 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) | ||||
|       { | ||||
|          char *pNextToken; | ||||
|          char *pSettingName = strtok_r(pSettingValueToken, "=", &pNextToken); | ||||
|          char *pSettingValue = strtok_r(NULL, "=", &pNextToken); | ||||
|          if (pSettingValue) | ||||
|          { | ||||
|             // Process the setting | ||||
|             if (strcmpi(pSettingName, "SVC_PRINCIPAL") == 0) | ||||
|             { | ||||
|                pKrbServiceName = pSettingValue; | ||||
|             } | ||||
|          } | ||||
|          else | ||||
|          { | ||||
|             DbgTrace(0, "-AuthTokenIf_GetAuthToken- Bad setting\n", 0); | ||||
|          } | ||||
|  | ||||
|          pSettingValueToken = strtok_r(NULL, ";", &pNextSettingToken); | ||||
|       } | ||||
|    } | ||||
|  | ||||
|    // Check if we need to construct the service name | ||||
|    if (pKrbServiceName == NULL | ||||
|   | ||||
		Reference in New Issue
	
	Block a user