yuri r7619 - in trunk/OpenDNSSEC/enforcer-ng/src: enforcer policy utils

commits at svn.opendnssec.org commits at svn.opendnssec.org
Tue Feb 4 16:35:35 CET 2014


Author: yuri
Date: Tue Feb  4 16:35:35 2014
New Revision: 7619
URL: http://fisheye.opendnssec.org/changelog/opendnssec?cs=7619

Log:
OPENDNSSEC-321 validate xml files on (re)read.

Modified:
   trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_all_cmd.cpp
   trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_conf_cmd.cpp
   trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_conf_task.cpp
   trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_conf_task.h
   trunk/OpenDNSSEC/enforcer-ng/src/policy/update_kasp_cmd.cpp
   trunk/OpenDNSSEC/enforcer-ng/src/policy/update_kasp_task.cpp
   trunk/OpenDNSSEC/enforcer-ng/src/policy/update_kasp_task.h
   trunk/OpenDNSSEC/enforcer-ng/src/utils/kaspcheck.c
   trunk/OpenDNSSEC/enforcer-ng/src/utils/kc_helper.c
   trunk/OpenDNSSEC/enforcer-ng/src/utils/kc_helper.h

Modified: trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_all_cmd.cpp
==============================================================================
--- trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_all_cmd.cpp	Tue Feb  4 14:10:25 2014	(r7618)
+++ trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_all_cmd.cpp	Tue Feb  4 16:35:35 2014	(r7619)
@@ -42,6 +42,7 @@
 #include "shared/file.h"
 #include "shared/str.h"
 #include "daemon/engine.h"
+#include "utils/kc_helper.h"
 
 
 #include "policy/update_kasp_task.h"
@@ -59,7 +60,8 @@
 
 static const char *module_str = "update_all_cmd";
 
-void help_update_all_cmd(int sockfd){
+void help_update_all_cmd(int sockfd)
+{
 	ods_printf(sockfd,
 	           "update all             Perform update kasp, zonelist and repositorylist.\n"
 	);
@@ -68,47 +70,72 @@
 static void
 flush_all_tasks(int sockfd, engine_type* engine)
 {
-    ods_log_debug("[%s] flushing all tasks...", module_str);
-    ods_printf(sockfd,"flushing all tasks...\n");
+	ods_log_debug("[%s] flushing all tasks...", module_str);
+	ods_printf(sockfd,"flushing all tasks...\n");
 
-    ods_log_assert(engine);
-    ods_log_assert(engine->taskq);
-    lock_basic_lock(&engine->taskq->schedule_lock);
-    /* [LOCK] schedule */
-    schedule_flush(engine->taskq, TASK_NONE);
-    /* [UNLOCK] schedule */
-    lock_basic_unlock(&engine->taskq->schedule_lock);
-    engine_wakeup_workers(engine);
+	ods_log_assert(engine);
+	ods_log_assert(engine->taskq);
+	lock_basic_lock(&engine->taskq->schedule_lock);
+	/* [LOCK] schedule */
+	schedule_flush(engine->taskq, TASK_NONE);
+	/* [UNLOCK] schedule */
+	lock_basic_unlock(&engine->taskq->schedule_lock);
+	engine_wakeup_workers(engine);
 }
 
-int handled_update_all_cmd(int sockfd, engine_type* engine, const char *cmd,
-					  ssize_t n){
-		const char *scmd = "update all";
-	    cmd = ods_check_command(cmd,n,scmd);
-	    if (!cmd)
-	        return 0; // not handled
-
-	    ods_log_debug("[%s] %s command", module_str, scmd);
-
-		// check that we are using a compatible protobuf version.
-		GOOGLE_PROTOBUF_VERIFY_VERSION;
-
-	    time_t tstart = time(NULL);
-
+int
+handled_update_all_cmd(int sockfd, engine_type* engine, const char *cmd,
+	ssize_t n)
+{
+	const char *scmd = "update all";
+	cmd = ods_check_command(cmd,n,scmd);
+	if (!cmd) return 0; // not handled
+	ods_log_debug("[%s] %s command", module_str, scmd);
+
+	// check that we are using a compatible protobuf version.
+	GOOGLE_PROTOBUF_VERIFY_VERSION;
+	time_t tstart = time(NULL);
+
+	autostart(engine);
+
+	/* todo error checking */
+
+	char *kasp = NULL;
+	char *zonelist = NULL;
+	char **replist = NULL;
+	int repcount, i;
+	
+	int error = 1;
+	if (check_conf(engine->config->cfg_filename, &kasp, 
+			&zonelist, &replist, &repcount, 0))
+		ods_log_error_and_printf(sockfd, module_str, 
+			"Unable to validate '%s' consistency.", 
+			engine->config->cfg_filename);
+	else if (check_kasp(kasp, replist, repcount, 0))
+		ods_log_error_and_printf(sockfd, module_str, 
+			"Unable to validate '%s' consistency.", kasp);
+	else if (check_zonelist(zonelist, 0))
+		ods_log_error_and_printf(sockfd, module_str, 
+			"Unable to validate '%s' consistency.", zonelist);
+	else error = 0;
+	
+	free(kasp);
+	free(zonelist);
+	if (replist) {
+		for (i = 0; i < repcount; i++) free(replist[i]);
+	}
 
-		autostart(engine);
-		perform_update_conf(engine,cmd,n);
+	if (!error) {
+		perform_update_conf(sockfd, engine, cmd, n);
 		perform_update_kasp(sockfd, engine->config);
 		perform_update_keyzones(sockfd, engine->config);
-
 		perform_update_hsmkeys(sockfd, engine->config, 0 /* automatic */);
 		perform_hsmkey_gen(sockfd, engine->config, 0 /* automatic */,
 						   engine->config->automatic_keygen_duration);
-
-	    flush_all_tasks(sockfd, engine);
-
-	    ods_printf(sockfd, "%s completed in %ld seconds.\n",scmd,time(NULL)-tstart);
-	    return 1;
+		flush_all_tasks(sockfd, engine);
+	}
+	ods_printf(sockfd, "%s completed in %ld seconds.\n",scmd,time(NULL)-tstart);
+	return 1;
 }
 
 

Modified: trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_conf_cmd.cpp
==============================================================================
--- trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_conf_cmd.cpp	Tue Feb  4 14:10:25 2014	(r7618)
+++ trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_conf_cmd.cpp	Tue Feb  4 16:35:35 2014	(r7619)
@@ -42,48 +42,47 @@
 void
 help_update_conf_cmd(int sockfd)
 {
-    ods_printf(sockfd,
-			   "update repositorylist  Import respositories from conf.xml into the enforcer.\n");
+	ods_printf(sockfd,
+		"update repositorylist  Import respositories from conf.xml "
+		"into the enforcer.\n");
 }
 
 static void
 flush_all_tasks(int sockfd, engine_type* engine)
 {
-    ods_log_debug("[%s] flushing all tasks...", module_str);
-    ods_printf(sockfd,"flushing all tasks...\n");
+	ods_log_debug("[%s] flushing all tasks...", module_str);
+	ods_printf(sockfd,"flushing all tasks...\n");
 
-    ods_log_assert(engine);
-    ods_log_assert(engine->taskq);
-    lock_basic_lock(&engine->taskq->schedule_lock);
-    /* [LOCK] schedule */
-    schedule_flush(engine->taskq, TASK_NONE);
-    /* [UNLOCK] schedule */
-    lock_basic_unlock(&engine->taskq->schedule_lock);
-    engine_wakeup_workers(engine);
+	ods_log_assert(engine);
+	ods_log_assert(engine->taskq);
+	lock_basic_lock(&engine->taskq->schedule_lock);
+	/* [LOCK] schedule */
+	schedule_flush(engine->taskq, TASK_NONE);
+	/* [UNLOCK] schedule */
+	lock_basic_unlock(&engine->taskq->schedule_lock);
+	engine_wakeup_workers(engine);
 }
 
 int
-handled_update_conf_cmd(int sockfd, engine_type* engine, const char *cmd,
-		ssize_t n)
+handled_update_conf_cmd(int sockfd, engine_type* engine, 
+	const char *cmd, ssize_t n)
 {
-    const char *scmd = "update repositorylist";
+	const char *scmd = "update repositorylist";
 
-    cmd = ods_check_command(cmd,n,scmd);
-    if (!cmd)
-        return 0; // not handled
+	cmd = ods_check_command(cmd,n,scmd);
+	if (!cmd)
+		return 0; // not handled
+
+	ods_log_debug("[%s] %s command", module_str, scmd);
+	time_t tstart = time(NULL);
+
+	if (perform_update_conf(sockfd, engine, cmd, n)) {
+		kill(engine->pid, SIGHUP);
+		ods_printf(sockfd, "Notifying enforcer of new respositories! \n");
+	}
 
-    ods_log_debug("[%s] %s command", module_str, scmd);
-    time_t tstart = time(NULL);
-
-    perform_update_conf(engine,cmd,n);
-
-
-    kill(engine->pid, SIGHUP);
-    ods_printf(sockfd, "Notifying enforcer of new respositories! \n");
-
-
-    ods_printf(sockfd,"%s completed in %ld seconds.\n",scmd,time(NULL)-tstart);
-    return 1;
+	ods_printf(sockfd,"%s completed in %ld seconds.\n",scmd,time(NULL)-tstart);
+	return 1;
 }
 
 

Modified: trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_conf_task.cpp
==============================================================================
--- trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_conf_task.cpp	Tue Feb  4 14:10:25 2014	(r7618)
+++ trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_conf_task.cpp	Tue Feb  4 16:35:35 2014	(r7619)
@@ -37,19 +37,37 @@
 #include "shared/file.h"
 #include "shared/log.h"
 #include "shared/status.h"
+#include "utils/kc_helper.h"
 
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
 
+static const char *module_str = "update_repositorylist_task";
 
-int perform_update_conf(engine_type* engine, const char *cmd,ssize_t n){
-
-	 int cmdline_verbosity = 0;
-	 const char* cfgfile = ODS_SE_CFGFILE;
-
-
+int perform_update_conf(int sockfd, engine_type* engine, 
+	const char *cmd, ssize_t n)
+{
+	const char* cfgfile = ODS_SE_CFGFILE;
+	char *kasp = NULL;
+	char *zonelist = NULL;
+	char **replist = NULL;
+	int repcount, i;
+
+	int cc_status = check_conf(cfgfile, &kasp, &zonelist, 
+		&replist, &repcount, 0);
+	free(kasp);
+	free(zonelist);
+	if (replist) {
+		for (i = 0; i < repcount; i++) free(replist[i]);
+	}
+		
+	if (cc_status) {
+		ods_log_error_and_printf(sockfd, module_str,
+			"Unable to validate '%s' consistency.", cfgfile);
+		return 0;
+	}
     engine->config->hsm = parse_conf_repositories(cfgfile);
-
+	return 1;
 }
 

Modified: trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_conf_task.h
==============================================================================
--- trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_conf_task.h	Tue Feb  4 14:10:25 2014	(r7618)
+++ trunk/OpenDNSSEC/enforcer-ng/src/enforcer/update_conf_task.h	Tue Feb  4 16:35:35 2014	(r7619)
@@ -38,7 +38,7 @@
 #include "daemon/cfg.h"
 #include "scheduler/task.h"
 
-int perform_update_conf(engine_type* engine, const char *cmd, ssize_t n);
+int perform_update_conf(int sockfd, engine_type* engine, const char *cmd, ssize_t n);
 
 
 #endif /* UPDATE_CONF_TASK_H_ */

Modified: trunk/OpenDNSSEC/enforcer-ng/src/policy/update_kasp_cmd.cpp
==============================================================================
--- trunk/OpenDNSSEC/enforcer-ng/src/policy/update_kasp_cmd.cpp	Tue Feb  4 14:10:25 2014	(r7618)
+++ trunk/OpenDNSSEC/enforcer-ng/src/policy/update_kasp_cmd.cpp	Tue Feb  4 16:35:35 2014	(r7619)
@@ -48,48 +48,45 @@
 void
 help_update_kasp_cmd(int sockfd)
 {
-    ods_printf(sockfd,
-			   "update kasp            Import policies from kasp.xml into the enforcer.\n");
+	ods_printf(sockfd, "update kasp            Import policies from"
+		" kasp.xml into the enforcer.\n");
 }
 
 static void
 flush_all_tasks(int sockfd, engine_type* engine)
 {
-    ods_log_debug("[%s] flushing all tasks...", module_str);
-    ods_printf(sockfd,"flushing all tasks...\n");
-    
-    ods_log_assert(engine);
-    ods_log_assert(engine->taskq);
-    lock_basic_lock(&engine->taskq->schedule_lock);
-    /* [LOCK] schedule */
-    schedule_flush(engine->taskq, TASK_NONE);
-    /* [UNLOCK] schedule */
-    lock_basic_unlock(&engine->taskq->schedule_lock);
-    engine_wakeup_workers(engine);
+	ods_log_debug("[%s] flushing all tasks...", module_str);
+	ods_printf(sockfd,"flushing all tasks...\n");
+
+	ods_log_assert(engine);
+	ods_log_assert(engine->taskq);
+	lock_basic_lock(&engine->taskq->schedule_lock);
+	/* [LOCK] schedule */
+	schedule_flush(engine->taskq, TASK_NONE);
+	/* [UNLOCK] schedule */
+	lock_basic_unlock(&engine->taskq->schedule_lock);
+	engine_wakeup_workers(engine);
 }
 
 int
-handled_update_kasp_cmd(int sockfd, engine_type* engine, const char *cmd,
-                        ssize_t n)
+handled_update_kasp_cmd(int sockfd, engine_type* engine, 
+	const char *cmd, ssize_t n)
 {
-    const char *scmd = "update kasp";
+	const char *scmd = "update kasp";
 
-    cmd = ods_check_command(cmd,n,scmd);
-    if (!cmd)
-        return 0; // not handled
-
-    ods_log_debug("[%s] %s command", module_str, scmd);
-
-    time_t tstart = time(NULL);
-	
-    perform_update_kasp(sockfd, engine->config);
-
-	//TODO: Need error checking so we only do this if the update succeeds
-	perform_hsmkey_gen(sockfd, engine->config, 0 /* automatic */,
-					   engine->config->automatic_keygen_duration);
-					
-    flush_all_tasks(sockfd, engine);
-	
-    ods_printf(sockfd,"%s completed in %ld seconds.\n",scmd,time(NULL)-tstart);
-    return 1;
+	cmd = ods_check_command(cmd,n,scmd);
+	if (!cmd)
+		return 0; // not handled
+
+	ods_log_debug("[%s] %s command", module_str, scmd);
+
+	time_t tstart = time(NULL);
+
+	if (perform_update_kasp(sockfd, engine->config)) {
+		perform_hsmkey_gen(sockfd, engine->config, 0 /* automatic */,
+						   engine->config->automatic_keygen_duration);
+		flush_all_tasks(sockfd, engine);
+	}
+	ods_printf(sockfd,"%s completed in %ld seconds.\n",scmd,time(NULL)-tstart);
+	return 1;
 }

Modified: trunk/OpenDNSSEC/enforcer-ng/src/policy/update_kasp_task.cpp
==============================================================================
--- trunk/OpenDNSSEC/enforcer-ng/src/policy/update_kasp_task.cpp	Tue Feb  4 14:10:25 2014	(r7618)
+++ trunk/OpenDNSSEC/enforcer-ng/src/policy/update_kasp_task.cpp	Tue Feb  4 16:35:35 2014	(r7619)
@@ -32,6 +32,7 @@
 #include "update_kasp_task.h"
 #include "shared/file.h"
 #include "shared/duration.h"
+#include "utils/kc_helper.h"
 
 #include <google/protobuf/descriptor.h>
 #include <google/protobuf/message.h>
@@ -92,18 +93,24 @@
 }
 
 
-void 
+bool 
 perform_update_kasp(int sockfd, engineconfig_type *config)
 {
 	GOOGLE_PROTOBUF_VERIFY_VERSION;
-    
-    std::auto_ptr< ::ods::kasp::KaspDocument > kaspDoc;
+
+	if (check_kasp(config->policy_filename, NULL, 0, 0)) {
+		ods_log_error_and_printf(sockfd, module_str,
+			"Unable to validate '%s' consistency.", config->policy_filename);
+		return false;
+	}
+
+	std::auto_ptr< ::ods::kasp::KaspDocument > kaspDoc;
 	if (!load_kasp_xml(sockfd, config->policy_filename, kaspDoc))
-		return; // errors have already been reported.
+		return false; // errors have already been reported.
 	
 	OrmConnRef conn;
 	if (!ods_orm_connect(sockfd, config, conn))
-		return;  // errors have already been reported.
+		return false;  // errors have already been reported.
 
 	//TODO: SPEED: We should create an index on the Policy.name column
 	
@@ -112,7 +119,7 @@
 		ods_log_error_and_printf(sockfd, module_str,
 								 "starting a database transaction for "
 								 "updating a policy failed");
-		return;
+		return false;
 	}	
 	
     // Go through the list of policies from the kasp.xml file to determine
@@ -126,7 +133,7 @@
 			if (!OrmQuoteStringValue(conn, policy.name(), qpolicy)) {
 				ods_log_error_and_printf(sockfd, module_str,
 										 "quoting a string failed");
-				return;
+				return false;
 			}
 			
 			//TODO: We should do an update for existing policies. 
@@ -138,7 +145,7 @@
 				ods_log_error_and_printf(sockfd, module_str,
 										 "failed to delete policy with "
 										 "name %s",policy.name().c_str());
-				return;
+				return false;
 			}
 				
 			// insert the policy we read from the kasp.xml file.
@@ -146,7 +153,7 @@
 			if (!OrmMessageInsert(conn, policy, policyid)) {
 				ods_log_error_and_printf(sockfd, module_str,
 							"inserting policy into the database failed");
-				return;
+				return false;
 			}
 		}
     }
@@ -154,8 +161,9 @@
 	if (!transaction.commit()) {
 		ods_log_error_and_printf(sockfd, module_str,
 								 "committing policy to the database failed");
-		return;
+		return false;
 	}
 	ods_log_info("kasp update complete");
 	ods_printf(sockfd,"kasp update complete\n");
+	return true;
 }

Modified: trunk/OpenDNSSEC/enforcer-ng/src/policy/update_kasp_task.h
==============================================================================
--- trunk/OpenDNSSEC/enforcer-ng/src/policy/update_kasp_task.h	Tue Feb  4 14:10:25 2014	(r7618)
+++ trunk/OpenDNSSEC/enforcer-ng/src/policy/update_kasp_task.h	Tue Feb  4 16:35:35 2014	(r7619)
@@ -35,6 +35,6 @@
 #include "daemon/cfg.h"
 #include "scheduler/task.h"
 
-void perform_update_kasp(int sockfd, engineconfig_type *config);
+bool perform_update_kasp(int sockfd, engineconfig_type *config);
 
 #endif

Modified: trunk/OpenDNSSEC/enforcer-ng/src/utils/kaspcheck.c
==============================================================================
--- trunk/OpenDNSSEC/enforcer-ng/src/utils/kaspcheck.c	Tue Feb  4 14:10:25 2014	(r7618)
+++ trunk/OpenDNSSEC/enforcer-ng/src/utils/kaspcheck.c	Tue Feb  4 16:35:35 2014	(r7619)
@@ -72,6 +72,7 @@
  */
 int main (int argc, char *argv[])
 {
+	extern int kc_helper_printto_stdout;
 	char *conffile = NULL, *kaspfile = NULL, *zonelistfile = NULL;
 	int status = 0; /* Will be non-zero on error (NOT warning) */
 	char **repo_list = NULL;
@@ -122,6 +123,8 @@
 		}
 	}
 
+	kc_helper_printto_stdout = 1;
+
 	if (!conffile)
 		conffile = StrStrdup((char *)OPENDNSSEC_CONFIG_FILE);
 		

Modified: trunk/OpenDNSSEC/enforcer-ng/src/utils/kc_helper.c
==============================================================================
--- trunk/OpenDNSSEC/enforcer-ng/src/utils/kc_helper.c	Tue Feb  4 14:10:25 2014	(r7618)
+++ trunk/OpenDNSSEC/enforcer-ng/src/utils/kc_helper.c	Tue Feb  4 16:35:35 2014	(r7619)
@@ -48,6 +48,8 @@
 
 #define StrFree(ptr) {if(ptr != NULL) {free(ptr); (ptr) = NULL;}}
 
+int kc_helper_printto_stdout = 0;
+
 void log_init(int facility, const char *program_name)
 {
 	openlog(program_name, 0, facility);
@@ -71,18 +73,16 @@
 
 	if (strncmp(format, "ERROR:", 6) == 0) {
 		vsyslog(LOG_ERR, format, args);
-	}
-	else if (strncmp(format, "WARNING:", 8) == 0) {
+	} else if (strncmp(format, "WARNING:", 8) == 0) {
 		vsyslog(LOG_WARNING, format, args);
-	}
-	else if (strncmp(format, "DEBUG:", 6) == 0) {
+	} else if (strncmp(format, "DEBUG:", 6) == 0) {
 		vsyslog(LOG_DEBUG, format, args);
-	}
-	else {
+	} else {
 		vsyslog(LOG_INFO, format, args);
 	}
 
-	vprintf(format, args2);
+	if (kc_helper_printto_stdout)
+		vprintf(format, args2);
 	
 	va_end(args);
 	va_end(args2);
@@ -102,7 +102,7 @@
 			filename, rngfilename);
 	}
 
-   	/* Load XML document */
+	/* Load XML document */
 	doc = xmlParseFile(filename);
 	if (doc == NULL) {
 		dual_log("ERROR: unable to parse file \"%s\"\n", filename);
@@ -1444,7 +1444,11 @@
 	return ptr1;
 }
 
-
+/* Used to squelch libxml output when linked in Enforcer */
+static void quiet_error_func(void * ctx, const char * msg, ...)
+{
+	(void)ctx; (void)msg;
+}
 
 /** Check the conf.xml file
  * @param conf: config file to validate
@@ -1452,7 +1456,7 @@
  * @param zonelist[in,out]: if NULL, will set it to zonelist.xml found 
  * 		in config
  * @return status (0 == success; 1 == error) */
-int check_conf(char *conf, char **kasp, char **zonelist, 
+int check_conf(const char *conf, char **kasp, char **zonelist, 
 	char ***repo_listout, int *repo_countout, int verbose)
 {
 	int status = 0;
@@ -1472,6 +1476,9 @@
 	KC_REPO* repo = NULL;
 	int* repo_mods = NULL; /* To see if we have looked at this module before */
 
+	if (!kc_helper_printto_stdout)
+		xmlSetGenericErrorFunc(NULL, quiet_error_func);
+
 	/* Check that the file is well-formed */
 	status = check_rng(conf, OPENDNSSEC_SCHEMA_DIR "/conf.rng", verbose);
 
@@ -1696,6 +1703,9 @@
 		return 1;
 	}
 
+	if (!kc_helper_printto_stdout)
+		xmlSetGenericErrorFunc(NULL, quiet_error_func);
+
 	/* Check that the  Zonelist file is well-formed */
 	if (check_rng(zonelist, OPENDNSSEC_SCHEMA_DIR "/zonelist.rng", verbose) != 0)
 		return 1;
@@ -1709,7 +1719,7 @@
  * Check the kasp.xml file
  * Return status (0 == success; 1 == error)
  */
-int check_kasp(char *kasp, char **repo_list, int repo_count, int verbose)
+int check_kasp(const char *kasp, char **repo_list, int repo_count, int verbose)
 {
 	int status = 0;
 	int i = 0;
@@ -1724,6 +1734,9 @@
 	char **policy_names = NULL;
 	int default_found = 0;
 
+	if (!kc_helper_printto_stdout)
+		xmlSetGenericErrorFunc(NULL, quiet_error_func);
+
 	if (!kasp) {
 		dual_log("ERROR: No location for kasp.xml set\n");
 		return 1;

Modified: trunk/OpenDNSSEC/enforcer-ng/src/utils/kc_helper.h
==============================================================================
--- trunk/OpenDNSSEC/enforcer-ng/src/utils/kc_helper.h	Tue Feb  4 14:10:25 2014	(r7618)
+++ trunk/OpenDNSSEC/enforcer-ng/src/utils/kc_helper.h	Tue Feb  4 16:35:35 2014	(r7619)
@@ -50,9 +50,9 @@
 	char *TokenLabel;
 } KC_REPO;
 
-int check_conf(char *conf, char **kasp, char **zonelist, 
+int check_conf(const char *conf, char **kasp, char **zonelist, 
 	char ***repo_listout, int *repo_countout, int verbose);
-int check_kasp(char *kasp, char **repo_list, int repo_count, int verbose);
+int check_kasp(const char *kasp, char **repo_list, int repo_count, int verbose);
 int check_zonelist(const char *zonelist, int verbose);
 
 void log_init(int facility, const char *program_name);



More information about the Opendnssec-commits mailing list