]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
If trigger_prefix is defined, use the passed in CONF_SECTION
authorNick Porter <nick@portercomputing.co.uk>
Mon, 25 Aug 2025 09:52:23 +0000 (10:52 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 25 Aug 2025 13:56:13 +0000 (14:56 +0100)
Allows, for example, rlm_detail, which only outputs to files, to avoid
having to put trigger definitions inside overly nested sections.

src/lib/server/module_rlm.c

index 57ba6df3f1f3eae84cc7c24715a5d5a806e6ae76..4b67084166dd148f8ed164d1ab780d84b44509ef 100644 (file)
@@ -120,7 +120,8 @@ exfile_t *module_rlm_exfile_init(TALLOC_CTX *ctx,
        handle = exfile_init(ctx, max_entries, max_idle, locking);
        if (!handle) return NULL;
 
-       if (triggers) exfile_enable_triggers(handle, cf_section_find(module, "file", NULL), trigger_prefix, trigger_args);
+       if (triggers) exfile_enable_triggers(handle, trigger_prefix ? module : cf_section_find(module, "file", NULL),
+                                            trigger_prefix, trigger_args);
 
        return handle;
 }