mirror of
https://github.com/amidaware/rmmagent.git
synced 2026-04-26 14:55:47 +03:00
[GH-ISSUE #32] Feature Request: Allow for defining path used for TempDir #24
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#24
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?
Originally created by @UranusBytes on GitHub (Feb 14, 2023).
Original GitHub issue: https://github.com/amidaware/rmmagent/issues/32
Originally assigned to: @wh1te909 on GitHub.
The Linux Level-1 CIS benchmarks set the
noexecflag on/tmp. This prevents the agent from being able to execute any scripts (fork/exec /tmp/trmm12345: permission denied)The
createTmpFileofutils.gois passing a blank string for the dir path toCreateTempthat is causing the function to use the path as returned byTempDir. https://pkg.go.dev/os#CreateTempgithub.com/amidaware/rmmagent@4b1f993a76/agent/utils.go (L312-L315)If the value for this path was a variable (Custom Field) defined at the site or agent level that was an empty string by default, then it would continue to use the default
TempDirpath, but allow for overrides in circumstances where a different path is needed...@wh1te909 commented on GitHub (Feb 27, 2023):
thanks I reworked the function to handle
noexecand fallback to the current dir