Skip to content

Commit

Permalink
[Auditbeat] Process dataset: Do not show non-root warning on W… (#12740)
Browse files Browse the repository at this point in the history
Remove the non-root warning on Windows as `os.Geteuid()` always returns `-1`.
  • Loading branch information
Christoph Wurm authored Jul 2, 2019
1 parent f29af84 commit ba9c79e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- System module: Start system module without host ID. {pull}12373[12373]
- Host dataset: Fix reboot detection logic. {pull}12591[12591]
- Add syscalls used by librpm for the system/package dataset to the default Auditbeat seccomp policy. {issue}12578[12578] {pull}12617[12617]
- Process dataset: Do not show non-root warning on Windows. {pull}12740[12740]

*Filebeat*

Expand Down
2 changes: 1 addition & 1 deletion x-pack/auditbeat/module/system/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func New(base mb.BaseMetricSet) (mb.MetricSet, error) {
ms.log.Debug("No state timestamp found")
}

if os.Geteuid() != 0 {
if runtime.GOOS != "windows" && os.Geteuid() != 0 {
ms.log.Warn("Running as non-root user, will likely not report all processes.")
}

Expand Down

0 comments on commit ba9c79e

Please sign in to comment.