]> the.earth.li Git - onak.git/blobdiff - onak.c
Move to CMake over autoconf
[onak.git] / onak.c
diff --git a/onak.c b/onak.c
index 89c2ec7ba04e5f779ef87c56863b1dd3d919b622..63f19d769679ccd9287c59e9e048aac7fc471230 100644 (file)
--- a/onak.c
+++ b/onak.c
@@ -27,6 +27,8 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include "build-config.h"
+
 #include "armor.h"
 #include "charfuncs.h"
 #include "cleankey.h"
@@ -41,7 +43,6 @@
 #include "onak-conf.h"
 #include "parsekey.h"
 #include "photoid.h"
-#include "version.h"
 
 void find_keys(struct onak_dbctx *dbctx,
                char *search, uint64_t keyid,
@@ -233,7 +234,7 @@ int main(int argc, char *argv[])
                        logthing(LOGTHING_INFO, "Finished reading %d keys.",
                                        result);
 
-                       result = cleankeys(keys);
+                       result = cleankeys(&keys, config.clean_policies);
                        logthing(LOGTHING_INFO, "%d keys cleaned.",
                                        result);
 
@@ -288,7 +289,8 @@ int main(int argc, char *argv[])
                                        result);
 
                        if (keys != NULL) {
-                               result = cleankeys(keys);
+                               result = cleankeys(&keys,
+                                               config.clean_policies);
                                logthing(LOGTHING_INFO, "%d keys cleaned.",
                                                result);
 
@@ -436,7 +438,7 @@ int main(int argc, char *argv[])
                        dbctx->starttrans(dbctx);
                        if (dbctx->fetch_key_id(dbctx, keyid, &keys, true)) {
                                dbctx->delete_key(dbctx, keyid, true);
-                               cleankeys(keys);
+                               cleankeys(&keys, config.clean_policies);
                                dbctx->store_key(dbctx, keys, true, false);
                        } else {
                                puts("Key not found");