Skip to content

[NX-2170] Macros in shell notification channel are not resolved #2377

Description

@netxms-migration-bot
  1. E.g. shell notification channel has the following configuration:
    Command=/bin/bash -c "/bin/echo ${recipient} ${text} >> /tmp/file.txt"

Executing tools->send notification produces empty line into the file. Happens on 3.9.334 under Ubuntu 18.04.

  1. Also in master built with sanitizer:
    2021.10.29 09:02:37.263 E [ncd.shell ] Output:
    2021.10.29 09:02:37.264 E [ncd.shell ] Output: =================================================================
    2021.10.29 09:02:37.264 E [ncd.shell ] Output:
    2021.10.29 09:02:37.265 E [ncd.shell ] Output: ==17596==ERROR: LeakSanitizer: detected memory leaks
    2021.10.29 09:02:37.265 E [ncd.shell ] Output:
    2021.10.29 09:02:37.265 E [ncd.shell ] Output: Direct leak of 281 byte(s) in 1 object(s) allocated from:
    2021.10.29 09:02:37.266 E [ncd.shell ] Output: #​0 0x7f48299cdb40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
    2021.10.29 09:02:37.266 E [ncd.shell ] Output: #​1 0x55e6234ee0dd in xmalloc (/bin/bash+0x870dd)
    2021.10.29 09:02:37.266 E [ncd.shell ] Output:
    2021.10.29 09:02:37.267 E [ncd.shell ] Output: SUMMARY: AddressSanitizer: 281 byte(s) leaked in 1 allocation(s).
    2021.10.29 09:02:37.267 E [ncd.shell ] Output:
    2021.10.29 09:02:37.276 D [procexec ] ProcessExecutor::readOutput(): stopped on read (rc=0 err=Success)

Migrated from track.radensolutions.com

  • Original Issue: NX-2170
  • Type: Bug
  • State: Fixed
  • Priority: Normal
  • Subsystem: Server
  • Created: 2021-11-09 16:50:57 UTC
  • Updated: 2021-11-15 22:35:38 UTC
  • Reporter: filipp.sudanov (@filippsudanov)
  • Last Updated By: Victor Kirhenshtein (@2128506)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions