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

src/backend/libpq/hba.c

index 55dca8fc57d040f230b9419333a147e01860c8a4..b355c08e6ddd4268920da73172542d5c96b3295c 100644 (file)
@@ -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");