Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[Heartbeat] Setuid to regular user / lower capabilities when possible #27878
[Heartbeat] Setuid to regular user / lower capabilities when possible #27878
Changes from 20 commits
88d2d1d
66d2e6b
f050f79
dbe92db
7413b0e
0d791d9
992a3c6
f938856
58ef9a3
b295517
206b346
576ca31
7e26638
61ae19c
fa24f7e
61542a0
eaadc02
2835b98
faa0989
84d7eac
ddbbf6e
1623137
e1799f6
94f95e4
bf90094
d055eb7
7ba5301
f757217
9b7c6e6
793214e
0aa410c
c9532f3
cee1ad6
de41310
3cafd9c
1ad68d3
7cddfa8
1a90113
9dcd749
735aa76
ea805d9
0a292ee
bdc4c19
6a49b88
64a9d9e
c55cd77
7c2fc33
d5da29c
39218ae
393bd27
70fcce6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it need to be here even now? If we havent set
BEAT_SETUID_AS
, do we run as heartbeat user?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, in that case we're running as root, and we bail with the error message. If that env var isn't set we don't know who to run as and we can't figure it out any other way. Keep in mind
heartbeat
is only the correct user in the heartbeat docker image. In the elastic-agent container the correct user iselastic-agent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this basically a dead code as its 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch lol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Came up during testing syscall stuff
This file was deleted.