Project

General

Profile

Actions

Bug #6490

closed
CT VJ

profiling: rule profiling doesn't support absolute paths

Bug #6490: profiling: rule profiling doesn't support absolute paths

Added by Corey Thomas over 2 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

While testing rule profiling I noticed that a filename-path of /dev/null will get appended to the log directory and end up complaining about the file not being found (like /some/path//dev/null).

profiling:
  # Run profiling for every X-th packet. The default is 1, which means we
  # profile every packet. If set to 1000, one packet is profiled for every
  # 1000 received.
  #sample-rate: 1000

  # rule profiling
  rules:

    # Profiling can be disabled here, but it will still have a
    # performance impact if compiled in.
    enabled: yes
    filename: profile.json # < this as /dev/null

Would expect the full path to be used so you can place files outside of your log directory (or log but dump in the case of /dev/null)


Subtasks 1 (0 open1 closed)

Bug #7166: profiling: rule profiling doesn't support absolute paths (7.0.x backport)ClosedJeff LucovskyActions

VJ Updated by Victor Julien almost 2 years ago Actions #1

  • Status changed from New to In Progress
  • Assignee changed from OISF Dev to Victor Julien
  • Priority changed from Low to Normal
  • Target version changed from TBD to 8.0.0-beta1

VJ Updated by Victor Julien almost 2 years ago Actions #2

  • Subject changed from Rule profiling log appends path to log directory to profiling: rule profiling doesn't support absolute paths
  • Status changed from In Progress to In Review

CT Updated by Corey Thomas almost 2 years ago ยท Edited Actions #3

This still seems to be failing in the PR. I'm not sure where PathIsAbsolute is defined but it must not be getting the /

Error: profiling-rules: failed to open /...../var/log/suricata///dev/null: No such file or directory [SCProfilingRuleDump:util-profiling-rules.c:415]

VJ Updated by Victor Julien almost 2 years ago Actions #4

  • Status changed from In Review to Resolved
  • Label Needs backport to 7.0 added

OT Updated by OISF Ticketbot almost 2 years ago Actions #5

  • Subtask #7166 added

OT Updated by OISF Ticketbot almost 2 years ago Actions #6

  • Label deleted (Needs backport to 7.0)

PA Updated by Philippe Antoine over 1 year ago Actions #7

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom