HEX
Server: Apache
System: Linux server.enlacediseno.com 4.18.0-553.62.1.el8_10.x86_64 #1 SMP Wed Jul 16 04:08:25 EDT 2025 x86_64
User: maor (1069)
PHP: 7.3.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/templates/virt/libvirt_chardevs.jinja
{% macro chardev(dev) -%}
  {% if dev.type == "unix" -%}
  <source mode="bind" path="{{ dev.path }}"/>
  {% elif dev.type in ["udp", "tcp"] -%}
  <source mode="bind" host="{{ dev.get('host', '0.0.0.0') }}" service="{{ dev.port }}"
    {% if dev.get('tls') is not none %}tls="{{'yes' if dev.tls else 'no'}}"{% endif %}/>
  {% elif dev.type in ["pipe", "dev", "pty", "file"] and dev.path -%}
  <source path="{{ dev.path }}"/>
  {%- endif %}
  {% if dev.type == "tcp" -%}
  <protocol type="{{ dev.protocol }}"/>
  {%- endif %}
  {% if "target_port" in dev or "target_type" in dev -%}
  <target port="{{ dev.get('target_port', 0) }}" {% if dev.target_type %}type="{{ dev.target_type }}"{% endif %}/>
  {%- endif %}
{%- endmacro %}