Skip to content

Commit

Permalink
Merge pull request #453 from KatsuragiCSL/patch-1
Browse files Browse the repository at this point in the history
swap ppid and pid user in "PPID belongs to a different user (not root)" test
  • Loading branch information
carlospolop authored Jan 13, 2025
2 parents 3e8078f + 7abe31c commit c3744a7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ if ! [ "$SEARCH_IN_FOLDER" ] && ! [ "$NOUSEPS" ]; then
continue
fi
ppid_user=$(get_user_by_pid "$ppid")
if echo "$user" | grep -Eqv "$ppid_user|root$"; then
if echo "$ppid_user" | grep -Eqv "$user|root$"; then
echo "Proc $pid with ppid $ppid is run by user $user but the ppid user is $ppid_user" | sed -${E} "s,$sh_usrs,${SED_LIGHT_CYAN}," | sed "s,$USER,${SED_LIGHT_MAGENTA}," | sed -${E} "s,$nosh_usrs,${SED_BLUE}," | sed "s,root,${SED_RED},"
fi
done
echo ""
fi
fi

0 comments on commit c3744a7

Please sign in to comment.