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>
(cherry picked from commit 423b1e5)
  • Loading branch information
dsseng authored and smira committed Nov 13, 2024
1 parent d4a3a2b commit 228a943
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 228a943

Please sign in to comment.