File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,11 @@ func (s *snapshotter) Write(e *event.Event) error {
186186 e .AppendParam (params .Exe , params .Path , ps .Exe )
187187 }
188188
189+ // if the process UUID has been initialized when
190+ // the internal event arrived, reassign it to the
191+ // current process state
192+ proc .AssignUUID (ps )
193+
189194 e .AppendParam (params .ProcessTokenIntegrityLevel , params .AnsiString , ps .TokenIntegrityLevel )
190195 e .AppendParam (params .ProcessTokenElevationType , params .AnsiString , ps .TokenElevationType )
191196 e .AppendParam (params .ProcessTokenIsElevated , params .Bool , ps .IsTokenElevated )
Original file line number Diff line number Diff line change @@ -21,20 +21,22 @@ package types
2121import (
2222 "encoding/binary"
2323 "fmt"
24+ "path/filepath"
25+ "strings"
26+ "sync"
27+
2428 "github.com/rabbitstack/fibratus/pkg/sys"
2529 "github.com/rabbitstack/fibratus/pkg/util/cmdline"
2630 "github.com/rabbitstack/fibratus/pkg/util/va"
2731 "golang.org/x/sys/windows"
28- "path/filepath"
29- "strings"
30- "sync"
3132
3233 "github.com/rabbitstack/fibratus/pkg/cap/section"
3334 htypes "github.com/rabbitstack/fibratus/pkg/handle/types"
3435 "github.com/rabbitstack/fibratus/pkg/pe"
3536
36- "github.com/rabbitstack/fibratus/pkg/util/bootid"
3737 "time"
38+
39+ "github.com/rabbitstack/fibratus/pkg/util/bootid"
3840)
3941
4042// PS encapsulates process' state such as allocated resources and other metadata.
@@ -125,6 +127,14 @@ func (ps *PS) UUID() uint64 {
125127 return ps .uuid
126128}
127129
130+ // AssignUUID assigns the UUID from the given
131+ // process if the UUID has been initialized.
132+ func (ps * PS ) AssignUUID (proc * PS ) {
133+ if proc .uuid != 0 {
134+ ps .uuid = proc .uuid
135+ }
136+ }
137+
128138// ProcessSequenceNumber contains the unique process sequence number.
129139type ProcessSequenceNumber struct {
130140 Seq [8 ]byte
You can’t perform that action at this time.
0 commit comments