Skip to content

Commit 228a943

Browse files
dssengsmira
authored andcommitted
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]> (cherry picked from commit 423b1e5)
1 parent d4a3a2b commit 228a943

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/pkg/miniprocfs/processes.go

Lines changed: 1 addition & 1 deletion
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)