From 60fc0e64e784c2d898d1c9b457b33c9cf9e480eb Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sat, 1 Apr 2023 06:50:37 +0200 Subject: [PATCH] bundles/{apt,pacman}: ignore sshd processes spawned by user nobody --- bundles/apt/files/upgrade-and-reboot | 2 +- bundles/pacman/files/upgrade-and-reboot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bundles/apt/files/upgrade-and-reboot b/bundles/apt/files/upgrade-and-reboot index ab99a10..1a0ff36 100644 --- a/bundles/apt/files/upgrade-and-reboot +++ b/bundles/apt/files/upgrade-and-reboot @@ -19,7 +19,7 @@ statusfile="/var/tmp/unattended_upgrades.status" # Workaround, because /var/tmp is usually 1777 [[ "$UID" == 0 ]] && chown root:root "$statusfile" -logins=$(ps h -C sshd -o euser | awk '$1 != "root" && $1 != "sshd" && $1 != "sshmon"') +logins=$(ps h -C sshd -o euser | awk '$1 != "root" && $1 != "sshd" && $1 != "sshmon" && $1 != "nobody"') if [[ -n "$logins" ]] then echo "Will abort now, there are active SSH logins: $logins" diff --git a/bundles/pacman/files/upgrade-and-reboot b/bundles/pacman/files/upgrade-and-reboot index b8339ce..8f1e9c1 100644 --- a/bundles/pacman/files/upgrade-and-reboot +++ b/bundles/pacman/files/upgrade-and-reboot @@ -19,7 +19,7 @@ statusfile="/var/tmp/unattended_upgrades.status" # Workaround, because /var/tmp is usually 1777 [[ "$UID" == 0 ]] && chown root:root "$statusfile" -logins=$(ps h -C sshd -o euser | awk '$1 != "root" && $1 != "sshd" && $1 != "sshmon"') +logins=$(ps h -C sshd -o euser | awk '$1 != "root" && $1 != "sshd" && $1 != "sshmon" && $1 != "nobody"') if [[ -n "$logins" ]] then echo "Will abort now, there are active SSH logins: $logins"