From 2ef627998f0be5c6b84bd23541a6a41f9ae65c5a Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Sun, 20 Apr 2025 15:02:21 +0000 Subject: [PATCH] aten_pdu: Use more strict LDAP query --- roles/aten_pdu/files/aten-mqtt-publish.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/aten_pdu/files/aten-mqtt-publish.sh b/roles/aten_pdu/files/aten-mqtt-publish.sh index 13432a0..ba81c93 100644 --- a/roles/aten_pdu/files/aten-mqtt-publish.sh +++ b/roles/aten_pdu/files/aten-mqtt-publish.sh @@ -62,7 +62,8 @@ do continue ;; esac - if device_name="$(ldapsearch -Q -LLL cn="${device}.*" cn | awk " + if device_name="$(ldapsearch -Q -LLL \ + "(&(objectClass=device)(cn=${device}.*))" cn | awk " { if (\$1 == \"cn:\") { if (name) {