Fix missing ldapscheme option in pg_hba_file_rules()
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Fri, 10 Jan 2025 21:02:58 +0000 (22:02 +0100)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Fri, 10 Jan 2025 21:02:58 +0000 (22:02 +0100)
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 <laurenz.albe@cybertec.at>
Reported-by: Laurenz Albe <laurenz.albe@cybertec.at>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Bug: 18769
Discussion: https://postgr.es/m/18769-dd8610cbc0405172@postgresql.org
Backpatch-through: v13

src/backend/utils/adt/hbafuncs.c

index 9fec6722a12dc6a205dfcc43fcda9e2309fb48ea..dcc95b2433057ab308ba1d2630c802c752845c69 100644 (file)
@@ -89,6 +89,10 @@ get_hba_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");