mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
16 lines
342 B
Go
16 lines
342 B
Go
package process
|
|
|
|
import "strings"
|
|
|
|
func (m *Process) IsUser() bool {
|
|
return m.Pid != 4 && // Kernel
|
|
!strings.HasPrefix(m.UserName, "NT-") // NT-Authority (localized!)
|
|
}
|
|
|
|
func (m *Process) IsAdmin() bool {
|
|
return strings.HasPrefix(m.UserName, "NT-") // NT-Authority (localized!)
|
|
}
|
|
|
|
func (m *Process) IsSystem() bool {
|
|
return m.Pid == 4
|
|
}
|