]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Add hex print of trust anchor pointer to trust anchor file temp
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 29 Jul 2019 14:51:40 +0000 (16:51 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Mon, 29 Jul 2019 14:51:40 +0000 (16:51 +0200)
  name to make it unique, for libunbound created multiple contexts.

doc/Changelog
validator/autotrust.c

index 3b9845c4dfb717f1cc8e96ae5dca90faa1ea1b43..6100d9a04d3ef7e710b653570c54e1047dcf002b 100644 (file)
@@ -1,5 +1,7 @@
 29 July 2019: Wouter
        - Add verbose log message when auth zone file is written, at level 4.
+       - Add hex print of trust anchor pointer to trust anchor file temp
+         name to make it unique, for libunbound created multiple contexts.
 
 23 July 2019: Wouter
        - Fix question section mismatch in local zone redirect.
index a72967302df1853ed324b384f1feb056301ca032..dceb2dcf5bb53247be78ca3d8f14db3d4dc1ae39 100644 (file)
@@ -1182,8 +1182,8 @@ void autr_write_file(struct module_env* env, struct trust_anchor* tp)
                return;
        }
        /* unique name with pid number and thread number */
-       snprintf(tempf, sizeof(tempf), "%s.%d-%d", fname, (int)getpid(),
-               env->worker?*(int*)env->worker:0);
+       snprintf(tempf, sizeof(tempf), "%s.%d-%d-%llx", fname, (int)getpid(),
+               env->worker?*(int*)env->worker:0, (long long int)tp);
        verbose(VERB_ALGO, "autotrust: write to disk: %s", tempf);
        out = fopen(tempf, "w");
        if(!out) {