From: Alan T. DeKok Date: Mon, 9 Oct 2023 13:18:40 +0000 (-0400) Subject: Revert "auto-convert LDAP" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e609cd19d73f762820e9171ed16ad5a4bddfe27;p=thirdparty%2Ffreeradius-server.git Revert "auto-convert LDAP" This reverts commit b4af84428990140af855f5ca7a6ecbc7790cc4bf. Nope. LDAP tests fail. Reverting until we do the conversion manually. --- diff --git a/src/tests/modules/ldap/acct.unlang b/src/tests/modules/ldap/acct.unlang index e7628d8bc6..0f7ab0582b 100644 --- a/src/tests/modules/ldap/acct.unlang +++ b/src/tests/modules/ldap/acct.unlang @@ -8,7 +8,7 @@ if (!ok) { test_fail } -&Tmp-String-0 := %ldap("ldap://$ENV{TEST_SERVER}/uid=bob,ou=people,dc=example,dc=com?description") +&Tmp-String-0 := "%{ldap:ldap://$ENV{TEST_SERVER}/uid=bob,ou=people,dc=example,dc=com?description}" if (&Tmp-String-0 != "User bob is online") { test_fail diff --git a/src/tests/modules/ldap/auth.unlang b/src/tests/modules/ldap/auth.unlang index 773cca3338..525246b9bf 100644 --- a/src/tests/modules/ldap/auth.unlang +++ b/src/tests/modules/ldap/auth.unlang @@ -48,7 +48,7 @@ ldap.authenticate ldap.send -&Tmp-String-0 := %ldap("ldap://$ENV{TEST_SERVER}/uid=john,ou=people,dc=example,dc=com?description") +&Tmp-String-0 := "%{ldap:ldap://$ENV{TEST_SERVER}/uid=john,ou=people,dc=example,dc=com?description}" if (!(&Tmp-String-0 == "User %{User-Name} authenticated")) { test_fail diff --git a/src/tests/modules/ldap/xlat.unlang b/src/tests/modules/ldap/xlat.unlang index 93810fe5c9..da809471a6 100644 --- a/src/tests/modules/ldap/xlat.unlang +++ b/src/tests/modules/ldap/xlat.unlang @@ -45,63 +45,63 @@ if (!(&Tmp-String-5 == ',+"\<>;*=()')) { test_fail } -&Tmp-String-6 := %ldap("ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=people,dc=example,dc=com?displayName?sub?(uid=john)") +&Tmp-String-6 := "%{ldap:ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=people,dc=example,dc=com?displayName?sub?(uid=john)}" if (!(&Tmp-String-6 == "John Doe")) { test_fail } # Return multiple values - could be in any sequence -&Tmp-String-7 := %ldap("ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=clients,dc=example,dc=com?freeradiusClientIdentifier?sub?(objectClass=freeradiusClient)") +&Tmp-String-7 := "%{ldap:ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=clients,dc=example,dc=com?freeradiusClientIdentifier?sub?(objectClass=freeradiusClient)}" if (!(&Tmp-String-7 == "1.1.1.12.2.2.2") && !(&Tmp-String-7 == "2.2.2.21.1.1.1")) { test_fail } # Use tainted string in filter - with special characters -&Tmp-String-8 := %ldap("ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=people,dc=example,dc=com?cn?sub?(displayName=*%{Tmp-String-9}*)") +&Tmp-String-8 := "%{ldap:ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=people,dc=example,dc=com?cn?sub?(displayName=*%{Tmp-String-9}*)}" if (!(&Tmp-String-8 == "Bob Smith")) { test_fail } # A query which should return no results -&Tmp-String-0 := %ldap("ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=people,dc=example,dc=com?displayName?sub?(uid=notknown)") +&Tmp-String-0 := "%{ldap:ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=people,dc=example,dc=com?displayName?sub?(uid=notknown)}" if (!(&Tmp-String-0 == "")) { test_fail } # Request an invalid DN -&Tmp-String-0 := %ldap("ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=notthere?displayName?sub?(uid=john)") +&Tmp-String-0 := "%{ldap:ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=notthere?displayName?sub?(uid=john)}" if (!(&Tmp-String-0 == "")) { test_fail } # Query within a dn which will prompt a referral -&Tmp-String-0 := %ldap("ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/dc=subdept,dc=example,dc=com?displayName?sub?(uid=fred)") +&Tmp-String-0 := "%{ldap:ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/dc=subdept,dc=example,dc=com?displayName?sub?(uid=fred)}" if (!(&Tmp-String-0 == "Fred Jones")) { test_fail } # Reference an alternative LDAP server in the xlat -&Tmp-String-1 := %ldap("ldap://$ENV{LDAP_TEST_SERVER}:%{$ENV{LDAP_TEST_SERVER_PORT} + 1}/dc=subdept,dc=example,dc=com?displayName?sub?(uid=fred)") +&Tmp-String-1 := "%{ldap:ldap://$ENV{LDAP_TEST_SERVER}:%{$ENV{LDAP_TEST_SERVER_PORT} + 1}/dc=subdept,dc=example,dc=com?displayName?sub?(uid=fred)}" if (!(&Tmp-String-1 == "Fred Jones")) { test_fail } # This query will follow 2 referrals, the second will present an alternate search base -&Tmp-String-2 := %ldap("ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=offsite,dc=subdept,dc=example,dc=com?displayName?sub?(uid=john)") +&Tmp-String-2 := "%{ldap:ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=offsite,dc=subdept,dc=example,dc=com?displayName?sub?(uid=john)}" if (!(&Tmp-String-2 == "John Doe")) { test_fail } # This query will follow 3 referrals - more than our max referral depth -&Tmp-String-3 := %ldap("ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=bounce1,dc=subdept,dc=example,dc=com?displayName?sub?(uid=fred)") +&Tmp-String-3 := "%{ldap:ldap://$ENV{LDAP_TEST_SERVER}:$ENV{LDAP_TEST_SERVER_PORT}/ou=bounce1,dc=subdept,dc=example,dc=com?displayName?sub?(uid=fred)}" if (!(&Tmp-String-3 == "")) { test_fail