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
Winlogbeat: Fix compatibility problems with newer OS versions in CI (#22362)
* Fix EVT_VARIANT struct definition for GOARCH=386
The first field of the structure, a union, didn't have the proper size
when compiled for 32-bits, causing "invalid argument" errors when the
struct was passed to an API.
Also, some EVT_VARIANT types weren't being handled properly.
* Remove formatting assertion in TestFormatMessage
Under most Windows versions, GUID values cannot be substituted with
string values. However, this is not the case under at least Win7 32bit.
Just disable the testing assertion as it has no impact.
* Update generated syscalls to avoid bug under 32-bit
Go's mkwinsyscall is generating syscall invocations that don't work properly
under GOARCH=386 (or any 32-bit arch). This only affects functions that
receive a 64-bit parameter, in this case only EvtSeek is affected.
This replaces `mkwinsyscall` with a patched one that adds some workaround
code.
* Enable all windows tests
* Disable TestFormatMessage/no_metadata tests
Under Windows 10, event formatting is not failing with an error even though
not metadata is being passed.
* Testing: Error check on publishing events to an event log
Under Windows 7 and Windows 10, writes to a newly created event log fail
occasionally. It seems that there is a delay between when an event log is
created and publishing events to it is allowed.
This commit updates the tests to retry on failure when creating an event
log for testing.
* Sysmon: Ignore winlog.user.* fields during test
For some reason, the following fields:
- winlog.user.type
- winlog.user.name
- winlog.user.domain
are not populated by the Sysmon module under Windows 7 32-bit. I couldn't
reproduce outside of CI, where it's failing to lookup SID `S-1-5-18`:
```
testing_windows.go:69: Expected and actual are different:
--- Expected
+++ Actual
@@ -47,6 +47,3 @@
"user": {
- "domain": "NT AUTHORITY",
- "identifier": "S-1-5-18",
- "name": "SYSTEM",
- "type": "Well Known Group"
+ "identifier": "S-1-5-18"
},
```
This commit updates the test to ignore those fields and removes them from
the golden files.
* Testing: limit event size in testWindowsEventLog
Under Windows 10, writing large events (31800 bytes) results in an empty
event log. Seems that the events are being silently dropped due to being
too big.
0 commit comments