Skip to content

Commit 060468a

Browse files
committed
Osquerybeat: Fix host_processes missing cmdline arguments
1 parent 6dea6d3 commit 060468a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • x-pack/osquerybeat/ext/osquery-extension/internal/proc

x-pack/osquerybeat/ext/osquery-extension/internal/proc/cmdline.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
package proc
66

77
import (
8+
"bytes"
89
"io/ioutil"
910
"strings"
1011
)
@@ -17,5 +18,7 @@ func ReadCmdLine(root string, pid string) (string, error) {
1718
return "", err
1819
}
1920

21+
b = bytes.ReplaceAll(b, []byte{0}, []byte{' '})
22+
2023
return strings.TrimSpace(string(b)), nil
2124
}

0 commit comments

Comments
 (0)