Skip to content

Commit

Permalink
add missing fbDecodeMetadata accesses
Browse files Browse the repository at this point in the history
  • Loading branch information
efd6 committed Aug 16, 2023
1 parent cced9cc commit 0f8dccb
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions auditbeat/module/file_integrity/flatbuffers.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,16 +257,18 @@ func fbDecodeMetadata(e *schema.Event) *Metadata {
}
mode := os.FileMode(info.Mode())
rtn := &Metadata{
Inode: info.Inode(),
UID: info.Uid(),
GID: info.Gid(),
SID: string(info.Sid()),
Mode: mode & ^(os.ModeSetuid | os.ModeSetgid),
Size: info.Size(),
MTime: time.Unix(0, info.MtimeNs()).UTC(),
CTime: time.Unix(0, info.CtimeNs()).UTC(),
SetUID: mode&os.ModeSetuid != 0,
SetGID: mode&os.ModeSetgid != 0,
Inode: info.Inode(),
UID: info.Uid(),
GID: info.Gid(),
SID: string(info.Sid()),
Mode: mode & ^(os.ModeSetuid | os.ModeSetgid),
Size: info.Size(),
MTime: time.Unix(0, info.MtimeNs()).UTC(),
CTime: time.Unix(0, info.CtimeNs()).UTC(),
SetUID: mode&os.ModeSetuid != 0,
SetGID: mode&os.ModeSetgid != 0,
SELinux: string(info.Selinux()),
POSIXACLAccess: string(info.PosixAclAccess()),
}

switch info.Type() {
Expand Down

0 comments on commit 0f8dccb

Please sign in to comment.