Skip to content

Commit 89619ea

Browse files
committed
Check for UID/EUID 0 if running process checks.
Requires root to read all of /proc.
1 parent 7686f62 commit 89619ea

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sandfly-entropyscan.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ func main() {
109109
}
110110

111111
if procOnly {
112+
if os.Geteuid() != 0 {
113+
log.Fatalf("process checking option requires UID/EUID 0 (root) to run")
114+
}
112115
// This will do a PID bust of all PID range to help detect hidden PIDs.
113116
pidPaths, err := genPIDExePaths()
114117
if err != nil {

0 commit comments

Comments
 (0)