Skip to content

replace get_ppid, check_parent_sshd. Add find_in_first_print_second#576

Open
antalk2 wants to merge 4 commits into
mviereck:masterfrom
antalk2:get_ppid
Open

replace get_ppid, check_parent_sshd. Add find_in_first_print_second#576
antalk2 wants to merge 4 commits into
mviereck:masterfrom
antalk2:get_ppid

Conversation

@antalk2

@antalk2 antalk2 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

#572

  • Matching in awk '$1 ~ /'${1:-}'/ { SUM += $2 } END { print SUM } '
    was wrong in both get_ppid and check_parent_sshd.
    It would match a pid 13 (in stdin) to a pid 1 in the query.

  • The SUM += $2 in check_parent_sshd tried to sum a text field.

Replaced with checkin equality and just printing $2,
in find_in_first_print_second()

  • check_parent_sshd() only checked the direct parent being "sshd"

Changed to also check parent of parent, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant