diff options
| author | Christian Breunig <christian@breunig.cc> | 2025-12-09 23:15:39 +0100 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2025-12-17 21:27:25 +0100 |
| commit | 197809bf77d841fe57bdcbaeeb3b078145aab140 (patch) | |
| tree | 6e044b10e3fa1648de2b6e8c6a3838da8e4dfa0d /src | |
| parent | 5566e6035b42e99eb874c3c5a35fe72e8435df38 (diff) | |
| download | vyos-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-x | src/conf_mode/system_login.py | 3 |
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 |
