Skip to content

Commit a2eb99a

Browse files
committed
Expand some more uses of "deleg" to "delegation" or "delegated".
Complete the task begun in 9c0a0e2: we don't want to use the abbreviation "deleg" for GSS delegation in any user-visible places. (For consistency, this also changes most internal uses too.) Abhijit Menon-Sen and Tom Lane Discussion: https://postgr.es/m/949048.1684639317@sss.pgh.pa.us
1 parent f4001a5 commit a2eb99a

File tree

16 files changed

+72
-70
lines changed

16 files changed

+72
-70
lines changed

contrib/postgres_fdw/expected/postgres_fdw.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ ALTER SERVER testserver1 OPTIONS (
172172
--requirepeer 'value',
173173
krbsrvname 'value',
174174
gsslib 'value',
175-
gssdeleg 'value'
175+
gssdelegation 'value'
176176
--replication 'value'
177177
);
178178
-- Error, invalid list syntax

contrib/postgres_fdw/option.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,10 +289,10 @@ InitPgFdwOptions(void)
289289
{"sslkey", UserMappingRelationId, true},
290290

291291
/*
292-
* gssdeleg is also a libpq option but should be allowed in a user
293-
* mapping context too
292+
* gssdelegation is also a libpq option but should be allowed in a
293+
* user mapping context too
294294
*/
295-
{"gssdeleg", UserMappingRelationId, true},
295+
{"gssdelegation", UserMappingRelationId, true},
296296

297297
{NULL, InvalidOid, false}
298298
};

contrib/postgres_fdw/sql/postgres_fdw.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ ALTER SERVER testserver1 OPTIONS (
186186
--requirepeer 'value',
187187
krbsrvname 'value',
188188
gsslib 'value',
189-
gssdeleg 'value'
189+
gssdelegation 'value'
190190
--replication 'value'
191191
);
192192

doc/src/sgml/libpq.sgml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,8 +2054,8 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname
20542054
</listitem>
20552055
</varlistentry>
20562056

2057-
<varlistentry id="libpq-connect-gssdeleg" xreflabel="gssdeleg">
2058-
<term><literal>gssdeleg</literal></term>
2057+
<varlistentry id="libpq-connect-gssdelegation" xreflabel="gssdelegation">
2058+
<term><literal>gssdelegation</literal></term>
20592059
<listitem>
20602060
<para>
20612061
Forward (delegate) GSS credentials to the server. The default is
@@ -8271,10 +8271,10 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
82718271
<listitem>
82728272
<para>
82738273
<indexterm>
8274-
<primary><envar>PGGSSDELEG</envar></primary>
8274+
<primary><envar>PGGSSDELEGATION</envar></primary>
82758275
</indexterm>
8276-
<envar>PGGSSDELEG</envar> behaves the same as the <xref
8277-
linkend="libpq-connect-gssdeleg"/> connection parameter.
8276+
<envar>PGGSSDELEGATION</envar> behaves the same as the <xref
8277+
linkend="libpq-connect-gssdelegation"/> connection parameter.
82788278
</para>
82798279
</listitem>
82808280

src/backend/catalog/system_views.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@ CREATE VIEW pg_stat_gssapi AS
980980
S.gss_auth AS gss_authenticated,
981981
S.gss_princ AS principal,
982982
S.gss_enc AS encrypted,
983-
S.gss_deleg AS credentials_delegated
983+
S.gss_delegation AS credentials_delegated
984984
FROM pg_stat_get_activity(NULL) AS S
985985
WHERE S.client_port IS NOT NULL;
986986

src/backend/foreign/foreign.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ static const struct ConnectionOption libpq_conninfo_options[] = {
574574
{"requiressl", ForeignServerRelationId},
575575
{"sslmode", ForeignServerRelationId},
576576
{"gsslib", ForeignServerRelationId},
577-
{"gssdeleg", ForeignServerRelationId},
577+
{"gssdelegation", ForeignServerRelationId},
578578
{NULL, InvalidOid}
579579
};
580580

src/backend/utils/init/postinit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,14 +282,14 @@ PerformAuthentication(Port *port)
282282

283283
if (princ)
284284
appendStringInfo(&logmsg,
285-
_(" GSS (authenticated=%s, encrypted=%s, deleg_credentials=%s, principal=%s)"),
285+
_(" GSS (authenticated=%s, encrypted=%s, delegated_credentials=%s, principal=%s)"),
286286
be_gssapi_get_auth(port) ? _("yes") : _("no"),
287287
be_gssapi_get_enc(port) ? _("yes") : _("no"),
288288
be_gssapi_get_delegation(port) ? _("yes") : _("no"),
289289
princ);
290290
else
291291
appendStringInfo(&logmsg,
292-
_(" GSS (authenticated=%s, encrypted=%s, deleg_credentials=%s)"),
292+
_(" GSS (authenticated=%s, encrypted=%s, delegated_credentials=%s)"),
293293
be_gssapi_get_auth(port) ? _("yes") : _("no"),
294294
be_gssapi_get_enc(port) ? _("yes") : _("no"),
295295
be_gssapi_get_delegation(port) ? _("yes") : _("no"));

src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@
5757
*/
5858

5959
/* yyyymmddN */
60-
#define CATALOG_VERSION_NO 202305191
60+
#define CATALOG_VERSION_NO 202305211
6161

6262
#endif

src/include/catalog/pg_proc.dat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5415,7 +5415,7 @@
54155415
prorettype => 'record', proargtypes => 'int4',
54165416
proallargtypes => '{int4,oid,int4,oid,text,text,text,text,text,timestamptz,timestamptz,timestamptz,timestamptz,inet,text,int4,xid,xid,text,bool,text,text,int4,text,numeric,text,bool,text,bool,bool,int4,int8}',
54175417
proargmodes => '{i,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o,o}',
5418-
proargnames => '{pid,datid,pid,usesysid,application_name,state,query,wait_event_type,wait_event,xact_start,query_start,backend_start,state_change,client_addr,client_hostname,client_port,backend_xid,backend_xmin,backend_type,ssl,sslversion,sslcipher,sslbits,ssl_client_dn,ssl_client_serial,ssl_issuer_dn,gss_auth,gss_princ,gss_enc,gss_deleg,leader_pid,query_id}',
5418+
proargnames => '{pid,datid,pid,usesysid,application_name,state,query,wait_event_type,wait_event,xact_start,query_start,backend_start,state_change,client_addr,client_hostname,client_port,backend_xid,backend_xmin,backend_type,ssl,sslversion,sslcipher,sslbits,ssl_client_dn,ssl_client_serial,ssl_issuer_dn,gss_auth,gss_princ,gss_enc,gss_delegation,leader_pid,query_id}',
54195419
prosrc => 'pg_stat_get_activity' },
54205420
{ oid => '3318',
54215421
descr => 'statistics: information about progress of backends running maintenance command',

src/interfaces/libpq/fe-auth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pg_GSS_continue(PGconn *conn, int payloadlen)
9797
if (!pg_GSS_have_cred_cache(&conn->gcred))
9898
conn->gcred = GSS_C_NO_CREDENTIAL;
9999

100-
if (conn->gssdeleg && pg_strcasecmp(conn->gssdeleg, "enable") == 0)
100+
if (conn->gssdelegation && pg_strcasecmp(conn->gssdelegation, "enable") == 0)
101101
gss_flags |= GSS_C_DELEG_FLAG;
102102

103103
maj_stat = gss_init_sec_context(&min_stat,

src/interfaces/libpq/fe-connect.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,9 +343,9 @@ static const internalPQconninfoOption PQconninfoOptions[] = {
343343
"GSS-library", "", 7, /* sizeof("gssapi") == 7 */
344344
offsetof(struct pg_conn, gsslib)},
345345

346-
{"gssdeleg", "PGGSSDELEG", NULL, NULL,
346+
{"gssdelegation", "PGGSSDELEGATION", NULL, NULL,
347347
"GSS-delegation", "", 8, /* sizeof("disable") == 8 */
348-
offsetof(struct pg_conn, gssdeleg)},
348+
offsetof(struct pg_conn, gssdelegation)},
349349

350350
{"replication", NULL, NULL, NULL,
351351
"Replication", "D", 5,
@@ -4453,7 +4453,7 @@ freePGconn(PGconn *conn)
44534453
free(conn->gssencmode);
44544454
free(conn->krbsrvname);
44554455
free(conn->gsslib);
4456-
free(conn->gssdeleg);
4456+
free(conn->gssdelegation);
44574457
free(conn->connip);
44584458
/* Note that conn->Pfdebug is not ours to close or free */
44594459
free(conn->write_err_msg);

src/interfaces/libpq/fe-secure-gssapi.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -622,18 +622,18 @@ pqsecure_open_gss(PGconn *conn)
622622
if (ret != STATUS_OK)
623623
return PGRES_POLLING_FAILED;
624624

625-
if (conn->gssdeleg && pg_strcasecmp(conn->gssdeleg, "enable") == 0)
625+
if (conn->gssdelegation && pg_strcasecmp(conn->gssdelegation, "enable") == 0)
626626
{
627627
/* Acquire credentials if possible */
628628
if (conn->gcred == GSS_C_NO_CREDENTIAL)
629629
(void) pg_GSS_have_cred_cache(&conn->gcred);
630630

631631
/*
632-
* We have credentials and gssdeleg is enabled, so request credential
633-
* delegation. This may or may not actually result in credentials
634-
* being delegated- it depends on if the forwardable flag has been set
635-
* in the credential and if the server is configured to accept
636-
* delegated credentials.
632+
* We have credentials and gssdelegation is enabled, so request
633+
* credential delegation. This may or may not actually result in
634+
* credentials being delegated- it depends on if the forwardable flag
635+
* has been set in the credential and if the server is configured to
636+
* accept delegated credentials.
637637
*/
638638
if (conn->gcred != GSS_C_NO_CREDENTIAL)
639639
gss_flags |= GSS_C_DELEG_FLAG;

src/interfaces/libpq/libpq-int.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ struct pg_conn
404404
char *krbsrvname; /* Kerberos service name */
405405
char *gsslib; /* What GSS library to use ("gssapi" or
406406
* "sspi") */
407-
char *gssdeleg; /* Try to delegate GSS credentials? */
407+
char *gssdelegation; /* Try to delegate GSS credentials? */
408408
char *ssl_min_protocol_version; /* minimum TLS protocol version */
409409
char *ssl_max_protocol_version; /* maximum TLS protocol version */
410410
char *target_session_attrs; /* desired session properties */

src/test/kerberos/README

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Running the tests
1919
=================
2020

2121
NOTE: You must have given the --enable-tap-tests argument to configure.
22+
Also, to use "make installcheck", you must have built and installed
23+
contrib/dblink and contrib/postgres_fdw in addition to the core code.
2224

2325
Run
2426
make check PG_TEST_EXTRA=kerberos

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy