You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting allow_superuser: false is expected to run Logstash successfully with non admin user. However, on Windows, Logstash exits with an error even when the user is not an admin.
Vagrant used to use WMI
Below is an example of how that looks, we could potentially cache these calls etc but it is probably going to be fraught with peril.
running_process=WIN32OLE.connect("winmgmts://")process_id=Process.pidprocess=running_process.ExecQuery("Select * from Win32_Process where ProcessId = #{process_id}")owner=process.each.first.GetOwner# Check if the user is in the administrators groupadmin_group=running_process.ExecQuery("Select * from Win32_Group where LocalAccount = True and SID = 'S-1-5-32-544'")group_users=running_process.ExecQuery("Select * from Win32_GroupUser where GroupComponent = 'Win32_Group.Name=\"#{admin_group.each.first.Name}\",Domain=\"#{owner[1]}\"'")group_users.eachdo |user|
returntrueifuser.PartComponent.include?(owner[0])endfalse
Vagrant used to use registry keys
See this iteration hashicorp/vagrant@52e98ff where they replace looking up registry keys. Given that PR i'm not convinced this is the best path forward
Setting
allow_superuser: false
is expected to run Logstash successfully with non admin user. However, on Windows, Logstash exits with an error even when the user is not an admin.The issue occurs because Process.euid() always returns 0 in Windows.
Relates: #14089
cc @mashhurs
The text was updated successfully, but these errors were encountered: