X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/91a98f43c64a6f8c76efb78b8301efaf9c6db1fe..e1385087ec060568a966a5305a9d88c24a2a0a55:/keydb_dynamic.c diff --git a/keydb_dynamic.c b/keydb_dynamic.c index f12889c..49d77b8 100644 --- a/keydb_dynamic.c +++ b/keydb_dynamic.c @@ -46,11 +46,11 @@ bool load_backend(void) if (config.backends_dir == NULL) { soname = malloc(strlen(config.db_backend) - + strlen("/libkeydb_") + + strlen("./libkeydb_") + strlen(".so") + 1); - sprintf(soname, "libkeydb_%s.so", config.db_backend); + sprintf(soname, "./libkeydb_%s.so", config.db_backend); } else { soname = malloc(strlen(config.db_backend) + strlen("/libkeydb_") @@ -66,12 +66,12 @@ bool load_backend(void) handle = dlopen(soname, RTLD_LAZY); if (handle == NULL) { - logthing(LOGTHING_ERROR, + logthing(LOGTHING_CRITICAL, "Failed to open handle to library '%s': %s", soname, dlerror()); free(soname); soname = NULL; - return false; + exit(EXIT_FAILURE); } free(soname); soname = NULL; @@ -203,7 +203,7 @@ struct ll *getkeysigs(uint64_t keyid, bool *revoked) sigs = keysigs(sigs, uids->sigs); } if (revoked != NULL) { - *revoked = (publickey->revocations != NULL); + *revoked = publickey->revoked; } free_publickey(publickey); } @@ -342,7 +342,7 @@ int update_keys(struct openpgp_publickey **keys, bool sendsync) */ if (oldkey != NULL) { merge_keys(oldkey, curkey); - if (curkey->revocations == NULL && + if (curkey->sigs == NULL && curkey->uids == NULL && curkey->subkeys == NULL) { if (prev == NULL) {