From 84b8f6d9f59aa2d40ffb8edccb3f1eacff32b6c0 Mon Sep 17 00:00:00 2001 From: Daniel Gustafsson Date: Fri, 10 Jan 2025 22:02:58 +0100 Subject: [PATCH] Fix missing ldapscheme option in pg_hba_file_rules() The ldapscheme option was missed when inspecing the HbaLine for assembling rows for the pg_hba_file_rules function. Backpatch to all supported versions. Author: Laurenz Albe Reported-by: Laurenz Albe Reviewed-by: Daniel Gustafsson Bug: 18769 Discussion: https://postgr.es/m/18769-dd8610cbc0405172@postgresql.org Backpatch-through: v13 --- src/backend/libpq/hba.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 55dca8fc57d..b355c08e6dd 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -2325,6 +2325,10 @@ gethba_options(HbaLine *hba) options[noptions++] = CStringGetTextDatum(psprintf("ldapport=%d", hba->ldapport)); + if (hba->ldapscheme) + options[noptions++] = + CStringGetTextDatum(psprintf("ldapscheme=%s", hba->ldapscheme)); + if (hba->ldaptls) options[noptions++] = CStringGetTextDatum("ldaptls=true"); -- 2.39.5