dynafile.restrictTemplateType

Optionally restricts dynafile templates to string and list templates so omfile can inspect their fixed path prefix before opening rendered paths.

This parameter applies to omfile: File Output Module.

Name:

dynafile.restrictTemplateType

Scope:

module

Type:

boolean

Default:

module=off

Required?:

no

Introduced:

not specified

Description

When enabled, omfile accepts only type="string" and type="list" templates for the dynaFile parameter. These template types expose their constant and property entries to omfile, which lets omfile derive the trusted static directory prefix and block rendered paths that escape it.

The default preserves plugin/string-generator and subtree dynafile templates. Those legacy forms use the fallback runtime guard: absolute paths and relative paths that lexically escape through .. are rejected. Use dynafile.dangerousPermitPathEscape="on" only when an affected legacy configuration must retain that behavior. Enable this option when an installation can use only string or list templates and wants that stricter configuration-time policy.

Module usage

module(load="builtin:omfile" dynafile.restrictTemplateType="on")

See also

See also omfile: File Output Module and dynaFile.


Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project

Contributing: Source & docs: rsyslog source project

© 2008–2026 Rainer Gerhards and others. Licensed under the Apache License 2.0.