mirror of
https://github.com/amidaware/rmmagent.git
synced 2026-04-26 06:45:48 +03:00
[PR #40] [MERGED] "Send Command" shell whitespace fix #55
Labels
No labels
bug
bug
enhancement
fixed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/rmmagent#55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/amidaware/rmmagent/pull/40
Author: @SoarinFerret
Created: 11/25/2023
Status: ✅ Merged
Merged: 12/23/2023
Merged by: @wh1te909
Base:
develop← Head:send-command-shell-fix📝 Commits (1)
751b50eFix bug where you cannot use '/usr/bin/env bash' as the shell for systems where bash is in a different location📊 Changes
1 file changed (+2 additions, -1 deletions)
View changed files
📝
agent/agent.go(+2 -1)📄 Description
If you try to use
/usr/bin/env bashas the custom shell inSend Command, no output is returned. This is because gocmd wants the first parameter to be the executable, with everything else being arguments afterwards.This simple 2 line patch fixes aforementioned issue. This is useful on systems like NixOS, where bash is not in an easily identifiable location, so you have to use the above syntax.
I do not know if this code would be useful in the other cases in the if statement - if so, I could update the patch to include those.
Thanks in advance!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.