.dbinit = DBINIT,
.check_sighash = true,
+
+ .bin_dir = NULL,
+ .mail_dir = NULL,
};
bool parsebool(char *str, bool fallback)
} else if (!strncmp("this_site ", curline, 10)) {
config.thissite = strdup(&curline[10]);
} else if (!strncmp("socket_name ", curline, 12) ||
- !strncmp("pks_bin_dir ", curline, 12) ||
- !strncmp("mail_dir ", curline, 9) ||
!strncmp("www_port ", curline, 9)) {
/*
* Not applicable; ignored for compatibility with pksd.
*/
+ } else if (!strncmp("pks_bin_dir ", curline, 12)) {
+ config.bin_dir = strdup(&curline[12]);
+ } else if (!strncmp("mail_dir ", curline, 9)) {
+ config.mail_dir = strdup(&curline[9]);
} else if (!strncmp("db_backend ", curline, 11)) {
backend->type = strdup(&curline[11]);
backend->name = strdup(&curline[11]);
free(config.backends_dir);
config.backends_dir = NULL;
}
+ if (config.bin_dir != NULL) {
+ free(config.bin_dir);
+ config.bin_dir = NULL;
+ }
+ if (config.mail_dir != NULL) {
+ free(config.mail_dir);
+ config.mail_dir = NULL;
+ }
}
/** Should we verify signature hashes match? */
bool check_sighash;
+
+ /*
+ * Options used by the email handling script.
+ * None of the C code uses this information, but we should be able
+ * to parse it.
+ */
+ /** Location of the onak binary, so the mail script can find it. */
+ char *bin_dir;
+ /** Where incoming mail gets queue, one file per mail. */
+ char *mail_dir;
};
/**