summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-12-09 23:15:39 +0100
committerChristian Breunig <christian@breunig.cc>2025-12-17 21:27:25 +0100
commit197809bf77d841fe57bdcbaeeb3b078145aab140 (patch)
tree6e044b10e3fa1648de2b6e8c6a3838da8e4dfa0d /src
parent5566e6035b42e99eb874c3c5a35fe72e8435df38 (diff)
downloadvyos-1x-197809bf77d841fe57bdcbaeeb3b078145aab140.tar.gz
vyos-1x-197809bf77d841fe57bdcbaeeb3b078145aab140.zip
login: T8086: replace getpwnam()/getpwuid() 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").
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/system_login.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/conf_mode/system_login.py b/src/conf_mode/system_login.py
index 4da1d10ae..3cff7a806 100755
--- a/src/conf_mode/system_login.py
+++ b/src/conf_mode/system_login.py
@@ -21,7 +21,6 @@ import json
from copy import deepcopy
from passlib.hosts import linux_context
from psutil import users
-from pwd import getpwuid
from sys import exit
from time import sleep
@@ -432,7 +431,7 @@ def apply(login):
# retrieve current owner of home directory and adjust on demand
dir_owner = None
try:
- dir_owner = getpwuid(os.stat(home_dir).st_uid).pw_name
+ dir_owner = get_local_passwd_entries(os.stat(home_dir).st_uid).pw_name
except:
pass