mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Revert "Add support for Kerberos credential delegation"
This reverts commit 3d4fa227bc.
Per discussion and buildfarm, this depends on APIs that seem to not
be available on at least one platform (NetBSD). Should be certainly
possible to rework to be optional on that platform if necessary but bit
late for that at this point.
Discussion: https://postgr.es/m/3286097.1680922218@sss.pgh.pa.us
This commit is contained in:
@@ -384,7 +384,6 @@ pgstat_bestart(void)
|
||||
lbeentry.st_gss = true;
|
||||
lgssstatus.gss_auth = be_gssapi_get_auth(MyProcPort);
|
||||
lgssstatus.gss_enc = be_gssapi_get_enc(MyProcPort);
|
||||
lgssstatus.gss_deleg = be_gssapi_get_deleg(MyProcPort);
|
||||
if (princ)
|
||||
strlcpy(lgssstatus.gss_princ, princ, NAMEDATALEN);
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ pg_stat_get_progress_info(PG_FUNCTION_ARGS)
|
||||
Datum
|
||||
pg_stat_get_activity(PG_FUNCTION_ARGS)
|
||||
{
|
||||
#define PG_STAT_GET_ACTIVITY_COLS 31
|
||||
#define PG_STAT_GET_ACTIVITY_COLS 30
|
||||
int num_backends = pgstat_fetch_stat_numbackends();
|
||||
int curr_backend;
|
||||
int pid = PG_ARGISNULL(0) ? -1 : PG_GETARG_INT32(0);
|
||||
@@ -395,7 +395,7 @@ pg_stat_get_activity(PG_FUNCTION_ARGS)
|
||||
pfree(clipped_activity);
|
||||
|
||||
/* leader_pid */
|
||||
nulls[29] = true;
|
||||
nulls[28] = true;
|
||||
|
||||
proc = BackendPidGetProc(beentry->st_procpid);
|
||||
|
||||
@@ -432,8 +432,8 @@ pg_stat_get_activity(PG_FUNCTION_ARGS)
|
||||
*/
|
||||
if (leader && leader->pid != beentry->st_procpid)
|
||||
{
|
||||
values[29] = Int32GetDatum(leader->pid);
|
||||
nulls[29] = false;
|
||||
values[28] = Int32GetDatum(leader->pid);
|
||||
nulls[28] = false;
|
||||
}
|
||||
else if (beentry->st_backendType == B_BG_WORKER)
|
||||
{
|
||||
@@ -441,8 +441,8 @@ pg_stat_get_activity(PG_FUNCTION_ARGS)
|
||||
|
||||
if (leader_pid != InvalidPid)
|
||||
{
|
||||
values[29] = Int32GetDatum(leader_pid);
|
||||
nulls[29] = false;
|
||||
values[28] = Int32GetDatum(leader_pid);
|
||||
nulls[28] = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -600,8 +600,6 @@ pg_stat_get_activity(PG_FUNCTION_ARGS)
|
||||
values[25] = BoolGetDatum(beentry->st_gssstatus->gss_auth); /* gss_auth */
|
||||
values[26] = CStringGetTextDatum(beentry->st_gssstatus->gss_princ);
|
||||
values[27] = BoolGetDatum(beentry->st_gssstatus->gss_enc); /* GSS Encryption in use */
|
||||
values[28] = BoolGetDatum(beentry->st_gssstatus->gss_deleg); /* GSS credentials
|
||||
* delegated */
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -609,13 +607,11 @@ pg_stat_get_activity(PG_FUNCTION_ARGS)
|
||||
nulls[26] = true; /* No GSS principal */
|
||||
values[27] = BoolGetDatum(false); /* GSS Encryption not in
|
||||
* use */
|
||||
values[28] = BoolGetDatum(false); /* GSS credentials not
|
||||
* delegated */
|
||||
}
|
||||
if (beentry->st_query_id == 0)
|
||||
nulls[30] = true;
|
||||
nulls[29] = true;
|
||||
else
|
||||
values[30] = UInt64GetDatum(beentry->st_query_id);
|
||||
values[29] = UInt64GetDatum(beentry->st_query_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -644,7 +640,6 @@ pg_stat_get_activity(PG_FUNCTION_ARGS)
|
||||
nulls[27] = true;
|
||||
nulls[28] = true;
|
||||
nulls[29] = true;
|
||||
nulls[30] = true;
|
||||
}
|
||||
|
||||
tuplestore_putvalues(rsinfo->setResult, rsinfo->setDesc, values, nulls);
|
||||
|
||||
@@ -282,17 +282,15 @@ PerformAuthentication(Port *port)
|
||||
|
||||
if (princ)
|
||||
appendStringInfo(&logmsg,
|
||||
_(" GSS (authenticated=%s, encrypted=%s, deleg_credentials=%s, principal=%s)"),
|
||||
_(" GSS (authenticated=%s, encrypted=%s, principal=%s)"),
|
||||
be_gssapi_get_auth(port) ? _("yes") : _("no"),
|
||||
be_gssapi_get_enc(port) ? _("yes") : _("no"),
|
||||
be_gssapi_get_deleg(port) ? _("yes") : _("no"),
|
||||
princ);
|
||||
else
|
||||
appendStringInfo(&logmsg,
|
||||
_(" GSS (authenticated=%s, encrypted=%s, deleg_credentials=%s)"),
|
||||
_(" GSS (authenticated=%s, encrypted=%s)"),
|
||||
be_gssapi_get_auth(port) ? _("yes") : _("no"),
|
||||
be_gssapi_get_enc(port) ? _("yes") : _("no"),
|
||||
be_gssapi_get_deleg(port) ? _("yes") : _("no"));
|
||||
be_gssapi_get_enc(port) ? _("yes") : _("no"));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1727,16 +1727,6 @@ struct config_bool ConfigureNamesBool[] =
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"gss_accept_deleg", PGC_SIGHUP, CONN_AUTH_AUTH,
|
||||
gettext_noop("Sets whether GSSAPI delegation should be accepted from the client."),
|
||||
NULL
|
||||
},
|
||||
&pg_gss_accept_deleg,
|
||||
false,
|
||||
NULL, NULL, NULL
|
||||
},
|
||||
|
||||
{
|
||||
{"escape_string_warning", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
|
||||
gettext_noop("Warn about backslash escapes in ordinary string literals."),
|
||||
|
||||
@@ -101,7 +101,6 @@
|
||||
# GSSAPI using Kerberos
|
||||
#krb_server_keyfile = 'FILE:${sysconfdir}/krb5.keytab'
|
||||
#krb_caseins_users = off
|
||||
#gss_accept_deleg = off
|
||||
|
||||
# - SSL -
|
||||
|
||||
|
||||
Reference in New Issue
Block a user