From: Ian Jackson Date: Sat, 7 Dec 2019 16:32:55 +0000 (+0000) Subject: make-public: Use cfgfile_log, not system_log X-Git-Tag: v0.6.0~121 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;ds=sidebyside;h=03a2ae9e4e7faba159bc944f51b01aba949de16d;p=secnet.git 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 --- 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) {