chiark
/
gitweb
/
~ian
/
secnet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c691ccf
)
load-private: Use cfgfile_log, not system_log
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 7 Dec 2019 16:30:17 +0000
(16:30 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 30 Dec 2019 13:15:50 +0000
(13:15 +0000)
Otherwise if this goes wrong, we segfault, because system_log is in
fact not available this early.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
privcache.c
patch
|
blob
|
history
diff --git
a/privcache.c
b/privcache.c
index b3c3e65585aa9fdd25a1c230b6cdf4602ccbddf5..5377c9049452500d36ce409cdee35fdcfc575f31 100644
(file)
--- a/
privcache.c
+++ b/
privcache.c
@@
-236,10
+236,13
@@
static list_t *loadprivate_apply(closure_t *self, struct cloc loc,
struct hash_if *defhash=
find_cl_if(context,"hash",CL_HASH,False,"load-private",loc);
+ struct cfgfile_log log;
+ cfgfile_log_init(&log,loc,"load-private");
+
struct sigprivkey_if *sigpriv;
closure_t *cl;
bool_t ok=
- uncached_load_file(sch,path,&databuf,defhash,&sigpriv,&cl,
system_
log);
+ uncached_load_file(sch,path,&databuf,defhash,&sigpriv,&cl,
&log.
log);
if (!ok) cfgfatal(loc,"load-private","private key loading failed");
BUF_FREE(&databuf);