64int main (
int argc,
char *argv[])
67 char *conffile = NULL, *kaspfile = NULL, *zonelistfile = NULL;
69 char **repo_list = NULL;
71 int ch, i, verbose = 0, option_index = 0;
72 static struct option long_options[] =
74 {
"config", required_argument, 0,
'c'},
75 {
"help", no_argument, 0,
'h'},
76 {
"kasp", required_argument, 0,
'k'},
77 {
"zonelist", required_argument, 0,
'z'},
78 {
"version", no_argument, 0,
'V'},
79 {
"verbose", no_argument, 0,
'v'},
82 char **policy_names = NULL;
86 if ((
progname = strrchr(argv[0],
'/'))) {
92 while ((ch = getopt_long(argc, argv,
"c:hk:Vvz:", long_options, &option_index)) != -1)
110 printf(
"%s version %s\n", PACKAGE_NAME, PACKAGE_VERSION);
122 conffile =
StrStrdup((
char *)OPENDNSSEC_CONFIG_FILE);
127 status =
check_conf(conffile, &kaspfile, &zonelistfile, &repo_list,
128 &repo_count, verbose);
130 status +=
check_kasp(kaspfile, repo_list, repo_count, verbose,
131 &policy_names, &policy_count);
133 status +=
check_zonelist(zonelistfile, verbose, policy_names, policy_count);
135 for (i = 0; i < policy_count; i++) {
136 free(policy_names[i]);
141 for (i = 0; i < repo_count; i++)
149 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)