-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
skip allow_superuser
in Windows OS
#16629
skip allow_superuser
in Windows OS
#16629
Conversation
As euid() is always zero in Windows, this commit excluded the checking of running as root in Windows.
Quality Gate passedIssues Measures |
💚 Build Succeeded
History
|
windows buildkite is green |
@@ -320,7 +320,7 @@ | |||
# | |||
# ------------ Other Settings -------------- | |||
# | |||
# Allow or block running Logstash as superuser (default: true) | |||
# Allow or block running Logstash as superuser (default: true). Windows are excluded from the checking | |||
# allow_superuser: false |
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.
Did we agree that we are not going to support this feature on Windows?
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.
If there is a desire to generally determine if a process is running as an admin or with elevated status on windows there is a pattern in Puppet for doing so https://github.com/puppetlabs/puppet/blob/e758d5c969403631810fa6385057ef0eaf03974f/lib/puppet/util/windows/user.rb#L11 though it is fairly complex and carries a dependency on ffi which requires native extensions.
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.
@mashhurs My goal here is to unblock the exhaustive test, not to bring the feature to windows
I believe it is another PR to fix the original handling
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.
follow up issue to fix windows handling #16632
allow_superuser
in Windows OSallow_superuser
in Windows OS
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.
LGTM!
Feature bug will be fixed/handlied with #16632
Release notes
[rn:skip]
What does this PR do?
As Process.euid() is always zero in Windows,
this commit excluded the checking of running as root in Windows.
Why is it important/What is the impact to the user?
Checklist
Author's Checklist
How to test this PR locally
Related issues
allow_superuser
to false as default #16558Use cases
Screenshots
Logs