]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
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 73d3ad1dadca0a3cf1d9e3ad136c6c4494b25b04..053221814e0f725a4d920baaa2bd93e5bef6cd49 100644 (file)
@@ -90,6 +90,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");