Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read ssh/telnet port from /etc: function and regex update #327

Merged
merged 3 commits into from
Nov 7, 2024

Conversation

Martin-Zeithaml
Copy link
Contributor

@Martin-Zeithaml Martin-Zeithaml commented Nov 7, 2024

Update of untested #326:

  • fs.fileExists should be without fs
  • Regex is missing start (^), it was returning port of otelnet on our system

With the debug mode

2024-11-07 11:12:07.193 <ZWED:33949259> ZWESVUSR DEBUG (plugins-init) readPortFromUnixConfig: /etc/ssh/sshd_config -> "Port 123" -> 123
2024-11-07 11:12:07.198 <ZWED:33949259> ZWESVUSR DEBUG (plugins-init) readPortFromUnixConfig: /etc/services -> "telnet          345" -> 345

Signed-off-by: Martin Zeithaml <[email protected]>
Signed-off-by: Martin Zeithaml <[email protected]>
@Martin-Zeithaml
Copy link
Contributor Author

@1000TurquoisePogs The previous PR was not tested and unfortunately there were bugs.

@timgerstel timgerstel merged commit 0ffc640 into v3.x/staging Nov 7, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

2 participants