mirror of
https://github.com/postgres/postgres.git
synced 2025-05-01 01:04:50 +03:00
Fix dispsize for libpq connection parameters channel_binding and gssencmode
channel_binding's longest allowed value is not "7", it is actually "8". gssencmode also got that wrong. A similar mistake has been fixed as of f4051e3. Backpatch down to v12, where gssencmode has been introduced. Reviewed-by: Daniel Gustafsson Discussion: https://postgr.es/m/20200128053633.GD1552@paquier.xyz Backpatch-through: 12
This commit is contained in:
parent
47bc9ced0d
commit
29e321cdd6
@ -215,7 +215,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
|
|||||||
offsetof(struct pg_conn, pgpassfile)},
|
offsetof(struct pg_conn, pgpassfile)},
|
||||||
|
|
||||||
{"channel_binding", "PGCHANNELBINDING", NULL, NULL,
|
{"channel_binding", "PGCHANNELBINDING", NULL, NULL,
|
||||||
"Channel-Binding", "", 7, /* sizeof("require") */
|
"Channel-Binding", "", 8, /* sizeof("require") == 8 */
|
||||||
offsetof(struct pg_conn, channel_binding)},
|
offsetof(struct pg_conn, channel_binding)},
|
||||||
|
|
||||||
{"connect_timeout", "PGCONNECT_TIMEOUT", NULL, NULL,
|
{"connect_timeout", "PGCONNECT_TIMEOUT", NULL, NULL,
|
||||||
@ -333,7 +333,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
|
|||||||
* support.
|
* support.
|
||||||
*/
|
*/
|
||||||
{"gssencmode", "PGGSSENCMODE", DefaultGSSMode, NULL,
|
{"gssencmode", "PGGSSENCMODE", DefaultGSSMode, NULL,
|
||||||
"GSSENC-Mode", "", 7, /* sizeof("disable") == 7 */
|
"GSSENC-Mode", "", 8, /* sizeof("disable") == 8 */
|
||||||
offsetof(struct pg_conn, gssencmode)},
|
offsetof(struct pg_conn, gssencmode)},
|
||||||
|
|
||||||
/* Kerberos and GSSAPI authentication support specifying the service name */
|
/* Kerberos and GSSAPI authentication support specifying the service name */
|
||||||
@ -342,7 +342,7 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
|
|||||||
offsetof(struct pg_conn, krbsrvname)},
|
offsetof(struct pg_conn, krbsrvname)},
|
||||||
|
|
||||||
{"gsslib", "PGGSSLIB", NULL, NULL,
|
{"gsslib", "PGGSSLIB", NULL, NULL,
|
||||||
"GSS-library", "", 7, /* sizeof("gssapi") = 7 */
|
"GSS-library", "", 7, /* sizeof("gssapi") == 7 */
|
||||||
offsetof(struct pg_conn, gsslib)},
|
offsetof(struct pg_conn, gsslib)},
|
||||||
|
|
||||||
{"replication", NULL, NULL, NULL,
|
{"replication", NULL, NULL, NULL,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user