summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2023-12-21 16:10:52 +0000
committerGitHub <noreply@github.com>2023-12-21 16:10:52 +0000
commit9d8b5c548ed227ad7430a7a576ddb089bdae19e9 (patch)
tree9b83379641efae3ec6ef93fc98827fd449e4ea9e
parent2ce91d476b672c17cf52795b5908c7b82e68a671 (diff)
parenta73b0fa64e40288cc0166ffd4cdd67a34f1901a5 (diff)
downloadvyos-build-9d8b5c548ed227ad7430a7a576ddb089bdae19e9.tar.gz
vyos-build-9d8b5c548ed227ad7430a7a576ddb089bdae19e9.zip
Merge pull request #477 from vyos/mergify/bp/sagitta/pr-474
ssh: T5841: Remove ssh-session-cleanup.service (backport #474)
-rwxr-xr-xdata/live-build-config/hooks/live/18-enable-disable_services.chroot1
-rw-r--r--data/live-build-config/includes.chroot/lib/systemd/system/ssh-session-cleanup.service13
-rwxr-xr-xdata/live-build-config/includes.chroot/usr/lib/openssh/ssh-session-cleanup11
3 files changed, 0 insertions, 25 deletions
diff --git a/data/live-build-config/hooks/live/18-enable-disable_services.chroot b/data/live-build-config/hooks/live/18-enable-disable_services.chroot
index bd1a0800..e9deac94 100755
--- a/data/live-build-config/hooks/live/18-enable-disable_services.chroot
+++ b/data/live-build-config/hooks/live/18-enable-disable_services.chroot
@@ -74,7 +74,6 @@ systemctl disable dpkg-db-backup.service
systemctl disable zabbix-agent2.service
echo I: Enabling services
-systemctl enable ssh-session-cleanup.service
systemctl enable vyos-hostsd.service
systemctl enable acpid.service
systemctl enable vyos-router.service
diff --git a/data/live-build-config/includes.chroot/lib/systemd/system/ssh-session-cleanup.service b/data/live-build-config/includes.chroot/lib/systemd/system/ssh-session-cleanup.service
deleted file mode 100644
index b8672722..00000000
--- a/data/live-build-config/includes.chroot/lib/systemd/system/ssh-session-cleanup.service
+++ /dev/null
@@ -1,13 +0,0 @@
-[Unit]
-Description=OpenBSD Secure Shell session cleanup
-Wants=network.target
-After=network.target
-
-[Service]
-ExecStart=/bin/true
-ExecStop=/usr/lib/openssh/ssh-session-cleanup
-RemainAfterExit=yes
-Type=oneshot
-
-[Install]
-WantedBy=multi-user.target
diff --git a/data/live-build-config/includes.chroot/usr/lib/openssh/ssh-session-cleanup b/data/live-build-config/includes.chroot/usr/lib/openssh/ssh-session-cleanup
deleted file mode 100755
index f283cc96..00000000
--- a/data/live-build-config/includes.chroot/usr/lib/openssh/ssh-session-cleanup
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-
-ssh_session_pattern='sshd: \S.*@pts/[0-9]+'
-
-IFS="$IFS@"
-pgrep -a -f "$ssh_session_pattern" | while read pid daemon user pty; do
- echo "Found ${daemon%:} session $pid on $pty; sending SIGTERM"
- kill "$pid" || true
-done
-
-exit 0