Date: Tue, 27 Jan 2026 18:44:13 +0000 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: c3688679ded5 - stable/14 - ctld: Fail UCL configurations with a nested error Message-ID: <6979077d.206cc.7be4aa0d@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c3688679ded592a35de9ed8ac1d576542c5ab02f commit c3688679ded592a35de9ed8ac1d576542c5ab02f Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2025-02-26 15:11:07 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2026-01-27 18:15:57 +0000 ctld: Fail UCL configurations with a nested error Errors from auth groups, portal groups, global luns, and targets were not propagated out of the main loop. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D49071 (cherry picked from commit f3a43b3db881679d0b82b97f18871422050a5819) --- usr.sbin/ctld/uclparse.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/usr.sbin/ctld/uclparse.c b/usr.sbin/ctld/uclparse.c index f8f8954304fa..2dc4872bee84 100644 --- a/usr.sbin/ctld/uclparse.c +++ b/usr.sbin/ctld/uclparse.c @@ -336,7 +336,9 @@ uclparse_toplevel(const ucl_object_t *top) if (obj->type == UCL_OBJECT) { iter = NULL; while ((child = ucl_iterate_object(obj, &iter, true))) { - uclparse_auth_group(ucl_object_key(child), child); + if (!uclparse_auth_group( + ucl_object_key(child), child)) + return (false); } } else { log_warnx("\"auth-group\" section is not an object"); @@ -348,7 +350,9 @@ uclparse_toplevel(const ucl_object_t *top) if (obj->type == UCL_OBJECT) { iter = NULL; while ((child = ucl_iterate_object(obj, &iter, true))) { - uclparse_portal_group(ucl_object_key(child), child); + if (!uclparse_portal_group( + ucl_object_key(child), child)) + return (false); } } else { log_warnx("\"portal-group\" section is not an object"); @@ -360,7 +364,9 @@ uclparse_toplevel(const ucl_object_t *top) if (obj->type == UCL_OBJECT) { iter = NULL; while ((child = ucl_iterate_object(obj, &iter, true))) { - uclparse_lun(ucl_object_key(child), child); + if (!uclparse_lun(ucl_object_key(child), + child)) + return (false); } } else { log_warnx("\"lun\" section is not an object"); @@ -379,8 +385,9 @@ uclparse_toplevel(const ucl_object_t *top) iter = NULL; while ((child = ucl_iterate_object(obj, &iter, true))) { - uclparse_target(ucl_object_key(child), - child); + if (!uclparse_target( + ucl_object_key(child), child)) + return (false); } } else { log_warnx("\"target\" section is not an object");home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6979077d.206cc.7be4aa0d>
