From 5566e6035b42e99eb874c3c5a35fe72e8435df38 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Tue, 9 Dec 2025 23:15:15 +0100 Subject: login: T8086: replace getpwall() occurances with get_local_passwd_entries() Switch to our custom implementation to avoid NSS/TACACS timeouts as explained in commit 4c9eaaa96e06 ("login: replace getpwall() user enumeration to avoid NSS/TACACS timeouts"). --- smoketest/scripts/cli/test_service_ssh.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'smoketest/scripts/cli/test_service_ssh.py') diff --git a/smoketest/scripts/cli/test_service_ssh.py b/smoketest/scripts/cli/test_service_ssh.py index 4ef3dd51d..8cd4a2178 100755 --- a/smoketest/scripts/cli/test_service_ssh.py +++ b/smoketest/scripts/cli/test_service_ssh.py @@ -19,12 +19,11 @@ import paramiko import re import unittest -from pwd import getpwall - from base_vyostest_shim import VyOSUnitTestSHIM from vyos.configsession import ConfigSessionError from vyos.defaults import config_files +from vyos.utils.auth import get_local_passwd_entries from vyos.utils.process import cmd from vyos.utils.process import is_systemd_service_running from vyos.utils.process import process_named_running @@ -311,7 +310,7 @@ class TestServiceSSH(VyOSUnitTestSHIM.TestCase): self.cli_commit() # After deletion the test user is not allowed to remain in /etc/passwd - usernames = [x[0] for x in getpwall()] + usernames = [x.pw_name for x in get_local_passwd_entries()] self.assertNotIn(test_user, usernames) def test_ssh_dynamic_protection(self): -- cgit v1.2.3