summaryrefslogtreecommitdiffstats
path: root/core/modules
diff options
context:
space:
mode:
authorSimon Rettberg2025-01-15 15:08:25 +0100
committerSimon Rettberg2025-01-15 15:08:25 +0100
commitd35c713d2b5d52aa7c8b6efc6099e2b725036a8a (patch)
tree8f16708f2e43a7bb50409362bc0533b1b1befbb8 /core/modules
parent[vmware12] Make sure directory exists, handle error (diff)
downloadmltk-d35c713d2b5d52aa7c8b6efc6099e2b725036a8a.tar.gz
mltk-d35c713d2b5d52aa7c8b6efc6099e2b725036a8a.tar.xz
mltk-d35c713d2b5d52aa7c8b6efc6099e2b725036a8a.zip
[run-virt] pwdaemon: Don't prefix UPN with DOMAIN\
Diffstat (limited to 'core/modules')
-rw-r--r--core/modules/run-virt/data/opt/openslx/pam/hooks/auth-slx-source.d/99-run_virt_credentials8
1 files changed, 7 insertions, 1 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/pam/hooks/auth-slx-source.d/99-run_virt_credentials b/core/modules/run-virt/data/opt/openslx/pam/hooks/auth-slx-source.d/99-run_virt_credentials
index 4611c461..258668fa 100644
--- a/core/modules/run-virt/data/opt/openslx/pam/hooks/auth-slx-source.d/99-run_virt_credentials
+++ b/core/modules/run-virt/data/opt/openslx/pam/hooks/auth-slx-source.d/99-run_virt_credentials
@@ -64,7 +64,13 @@ if [ -n "$TEMP_HOME_DIR" ]; then
fi
fi
fi
- [ -n "$XDOMAIN" ] && XDOMAIN="$(echo "$XDOMAIN" | tr 'a-z' 'A-Z')\\"
+
+ # Do not prefix the domain if the username is in user principal name format
+ if printf "%s" "$XDOMAIN" | grep -q '.@..*\..'; then
+ XDOMAIN=
+ elif [ -n "$XDOMAIN" ]; then
+ XDOMAIN="$(echo "$XDOMAIN" | tr 'a-z' 'A-Z')\\"
+ fi
[ -z "${SLX_PXE_CLIENT_IP}${SLX_KCL_SERVERS}" ] && . /opt/openslx/config
# Allow querying password via UNIX Socket?