68int main (
int argc,
char *argv[])
71 char *conffile = NULL, *kaspfile = NULL, *zonelistfile = NULL;
73 char **repo_list = NULL;
75 int ch, i, verbose = 0, option_index = 0;
76 static struct option long_options[] =
78 {
"config", required_argument, 0,
'c'},
79 {
"help", no_argument, 0,
'h'},
80 {
"kasp", required_argument, 0,
'k'},
81 {
"zonelist", required_argument, 0,
'z'},
82 {
"version", no_argument, 0,
'V'},
83 {
"verbose", no_argument, 0,
'v'},
86 char **policy_names = NULL;
90 if ((
progname = strrchr(argv[0],
'/'))) {
96 while ((ch = getopt_long(argc, argv,
"c:hk:Vvz:", long_options, &option_index)) != -1)
114 printf(
"%s version %s\n", PACKAGE_NAME, PACKAGE_VERSION);
126 conffile =
StrStrdup((
char *)OPENDNSSEC_CONFIG_FILE);
131 status =
check_conf(conffile, &kaspfile, &zonelistfile, &repo_list,
132 &repo_count, verbose);
134 status +=
check_kasp(kaspfile, repo_list, repo_count, verbose,
135 &policy_names, &policy_count);
137 status +=
check_zonelist(zonelistfile, verbose, policy_names, policy_count);
139 for (i = 0; i < policy_count; i++) {
140 free(policy_names[i]);
145 for (i = 0; i < repo_count; i++)
153 dual_log(
"DEBUG: finished %d", status);
int check_kasp(const char *kasp, char **repo_list, int repo_count, int verbose, char ***policy_names_out, int *policy_count_out)
int check_conf(const char *conf, char **kasp, char **zonelist, char ***repo_listout, int *repo_countout, int verbose)