From f36293bae42694a8a5f67e5bb9ad41e039588659 Mon Sep 17 00:00:00 2001 From: Simon Halvorsen Date: Thu, 2 Jul 2026 19:15:33 +0200 Subject: [PATCH] ENT-10199: Fixed a bug where some functions would not understand current namespace Ticket: ENT-10199 Changelog: Title Signed-off-by: Simon Halvorsen --- libpromises/fncall.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libpromises/fncall.c b/libpromises/fncall.c index 3056d58132..8982ccca46 100644 --- a/libpromises/fncall.c +++ b/libpromises/fncall.c @@ -68,6 +68,8 @@ Rlist *NewExpArgs(EvalContext *ctx, const Policy *policy, const FnCall *fp, cons return RlistCopy(fp->args); } + assert(fp != NULL); + const FnCallType *fn = FnCallTypeGet(fp->name); if (fn == NULL) { @@ -101,7 +103,9 @@ Rlist *NewExpArgs(EvalContext *ctx, const Policy *policy, const FnCall *fp, cons } else { - rval = ExpandPrivateRval(ctx, NULL, NULL, rp->val.item, rp->val.type); + const Bundle *caller_bundle = fp->caller ? PromiseGetBundle(fp->caller) : NULL; + const char *caller_ns = caller_bundle ? caller_bundle->ns : NULL; + rval = ExpandPrivateRval(ctx, caller_ns, NULL, rp->val.item, rp->val.type); assert(rval.item); }