]> granicus.if.org Git - postgresql/commitdiff
libpq: ccache -> credential cache
authorPeter Eisentraut <peter@eisentraut.org>
Fri, 6 Sep 2019 07:15:35 +0000 (09:15 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Fri, 6 Sep 2019 07:15:35 +0000 (09:15 +0200)
The term "ccache" is overloaded.  Let's be more clear, in case someone
other than a Kerberos wizard has to read this code.

src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-gssapi-common.c
src/interfaces/libpq/fe-gssapi-common.h

index 9a5aa1a3c5ffb7249d09f69f0cfe5f31a611501d..4fe871406c7a10c79fbd8bce49a554a2a05d7f89 100644 (file)
@@ -2748,13 +2748,13 @@ keep_going:                                             /* We will come back to here until there is
 #ifdef ENABLE_GSS
 
                                /*
-                                * If GSSAPI is enabled and we have a ccache, try to set it up
-                                * before sending startup messages.  If it's already
+                                * If GSSAPI is enabled and we have a credential cache, try to
+                                * set it up before sending startup messages.  If it's already
                                 * operating, don't try SSL and instead just build the startup
                                 * packet.
                                 */
                                if (conn->try_gss && !conn->gctx)
-                                       conn->try_gss = pg_GSS_have_ccache(&conn->gcred);
+                                       conn->try_gss = pg_GSS_have_cred_cache(&conn->gcred);
                                if (conn->try_gss && !conn->gctx)
                                {
                                        ProtocolVersion pv = pg_hton32(NEGOTIATE_GSS_CODE);
@@ -2774,7 +2774,7 @@ keep_going:                                               /* We will come back to here until there is
                                else if (!conn->gctx && conn->gssencmode[0] == 'r')
                                {
                                        appendPQExpBufferStr(&conn->errorMessage,
-                                                                                libpq_gettext("GSSAPI encryption required, but was impossible (possibly no ccache, no server support, or using a local socket)\n"));
+                                                                                libpq_gettext("GSSAPI encryption required, but was impossible (possibly no credential cache, no server support, or using a local socket)\n"));
                                        goto error_return;
                                }
 #endif
index f3735df1bfae1fe2bd63d06d3dd83269026291b0..3c230e47a8426aaa148055dd8052f0b03130d229 100644 (file)
@@ -58,7 +58,7 @@ pg_GSS_error(const char *mprefix, PGconn *conn,
  * Check if we can acquire credentials at all (and yield them if so).
  */
 bool
-pg_GSS_have_ccache(gss_cred_id_t *cred_out)
+pg_GSS_have_cred_cache(gss_cred_id_t *cred_out)
 {
        OM_uint32       major,
                                minor;
index ebe24f7ca019979a992994c47fd220d96c870cb8..3c42b4253652888c54ddd5b86f40367b11172041 100644 (file)
@@ -20,7 +20,7 @@
 
 void           pg_GSS_error(const char *mprefix, PGconn *conn,
                                                 OM_uint32 maj_stat, OM_uint32 min_stat);
-bool           pg_GSS_have_ccache(gss_cred_id_t *cred_out);
+bool           pg_GSS_have_cred_cache(gss_cred_id_t *cred_out);
 int                    pg_GSS_load_servicename(PGconn *conn);
 
 #endif