]> granicus.if.org Git - p11-kit/commitdiff
trust: Do reload object removals inside a loading block
authorStef Walter <stef@thewalter.net>
Tue, 27 Aug 2013 19:20:16 +0000 (21:20 +0200)
committerStef Walter <stef@thewalter.net>
Thu, 29 Aug 2013 08:30:04 +0000 (10:30 +0200)
So that validation/storage logic doesn't kick in if a file was
removed outside of p11-kit trust module.

trust/token.c

index 427c1d5c12e905d35b9194428bc5f6f7b7347098..eeebb82cb3419a1925e8d2dee6ce556f782681b9 100644 (file)
@@ -137,10 +137,14 @@ loader_gone_file (p11_token *token,
 
        CK_RV rv;
 
+       p11_index_load (token->index);
+
        /* Remove everything at this origin */
        rv = p11_index_replace_all (token->index, origin, CKA_INVALID, NULL);
        return_if_fail (rv == CKR_OK);
 
+       p11_index_finish (token->index);
+
        /* No longer track info about this file */
        loader_not_loaded (token, filename);
 }