commit c506644a01c93e409523d0bf841f1776c94cb078 from: Stefan Sperling date: Fri Jul 18 12:24:34 2025 UTC fix gotd reload when /etc/gotd-secrets.conf is used When sending the configuration to the newly reloaded gotd process we must send the path to the secrets file if it is being used. Otherwise, the new process will die with "unexpected amount of data received in imsg" errors. Test coverage will be added later as part of some new gotsysd tests which I have in progress. commit - c63cd1cb979149999684e3cd77464f872e8ff9aa commit + c506644a01c93e409523d0bf841f1776c94cb078 blob - 87c9b0e801cd4411f1309e3af994f88f17a932ab blob + 749adfaf1adfe968546d819330f3dbcfa89666b6 --- gotd/gotd.c +++ gotd/gotd.c @@ -596,7 +596,10 @@ send_reload_config(struct gotd_imsgev *iev) } if (imsg_compose(&iev->ibuf, GOTD_IMSG_RELOAD_SECRETS, - GOTD_PROC_GOTD, gotd.pid, gotd_reload_secrets_fd, NULL, 0) == -1) { + GOTD_PROC_GOTD, gotd.pid, gotd_reload_secrets_fd, + gotd_reload_secrets_path ? gotd_reload_secrets_path : NULL, + gotd_reload_secrets_path ? strlen(gotd_reload_secrets_path) : 0) + == -1) { err = got_error_from_errno("imsg compose RELOAD_SECRETS"); goto done; }