TNC: Allow tnc_config file path to be replaced
authorJouni Malinen <j@w1.fi>
Fri, 16 May 2014 19:37:54 +0000 (22:37 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 17 May 2014 17:05:55 +0000 (20:05 +0300)
This is for enabling easier testing of TNCS/TNCC functionality as part
of the test scripts without having to use the fixed /etc/tnc_config
location that could be used by the main system and would require changes
within /etc.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/eap_peer/tncc.c
src/eap_server/tncs.c

index a3ec395..3fb3f16 100644 (file)
@@ -25,7 +25,9 @@
 #endif /* UNICODE */
 
 
+#ifndef TNC_CONFIG_FILE
 #define TNC_CONFIG_FILE "/etc/tnc_config"
+#endif /* TNC_CONFIG_FILE */
 #define TNC_WINREG_PATH TEXT("SOFTWARE\\Trusted Computing Group\\TNC\\IMCs")
 #define IF_TNCCS_START \
 "<?xml version=\"1.0\"?>\n" \
index e429f1e..c6c71c5 100644 (file)
@@ -19,7 +19,9 @@
 /* TODO: TNCS must be thread-safe; review the code and add locking etc. if
  * needed.. */
 
+#ifndef TNC_CONFIG_FILE
 #define TNC_CONFIG_FILE "/etc/tnc_config"
+#endif /* TNC_CONFIG_FILE */
 #define IF_TNCCS_START \
 "<?xml version=\"1.0\"?>\n" \
 "<TNCCS-Batch BatchId=\"%d\" Recipient=\"TNCS\" " \