Skip to content

Commit 423b1e5

Browse files
committed
fix: do not trim 0 from process SELinux label
Seems like a typo, zero is a valid character in SELinux labels Signed-off-by: Dmitry Sharshakov <[email protected]>
1 parent 2136358 commit 423b1e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: internal/pkg/miniprocfs/processes.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func (procs *Processes) readProc(pidString string) (*machine.ProcessInfo, error)
164164
var label string
165165

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

170170
return &machine.ProcessInfo{

0 commit comments

Comments
 (0)