From 03a2ae9e4e7faba159bc944f51b01aba949de16d Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 7 Dec 2019 16:32:55 +0000 Subject: [PATCH 1/1] make-public: Use cfgfile_log, not system_log Otherwise if this goes wrong, we segfault, because system_log is in fact not available this early. Signed-off-by: Ian Jackson --- pubkeys.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pubkeys.c b/pubkeys.c index 903103f..62f5525 100644 --- a/pubkeys.c +++ b/pubkeys.c @@ -77,9 +77,12 @@ static list_t *makepublic_apply(closure_t *self, struct cloc loc, buf.size += base91s_decode_end(&b91,buf.start+buf.size); assert(buf.size <= buf.alloclen); + struct cfgfile_log log; + cfgfile_log_init(&log,loc,"make-public"); + struct sigpubkey_if *pubkey; closure_t *cl; - bool_t ok=sch->loadpub(sch,&buf,&pubkey,&cl,system_log,loc); + bool_t ok=sch->loadpub(sch,&buf,&pubkey,&cl,&log.log,loc); if (!ok) cfgfatal(loc,"make-public","public key loading failed"); if (pubkey->sethash) { -- 2.30.2