Skip to content

Commit

Permalink
fix: do not trim 0 from process SELinux label
Browse files Browse the repository at this point in the history
Seems like a typo, zero is a valid character in SELinux labels

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
  • Loading branch information
dsseng committed Oct 29, 2024
1 parent 2136358 commit 423b1e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pkg/miniprocfs/processes.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (procs *Processes) readProc(pidString string) (*machine.ProcessInfo, error)
var label string

if err = procs.readFileIntoBuf(path + "attr/current"); err == nil {
label = string(bytes.Trim(procs.buf, "\x000\n"))
label = string(bytes.Trim(procs.buf, "\x00\n"))
}

return &machine.ProcessInfo{
Expand Down

0 comments on commit 423b1e5

Please sign in to comment.