MCPcopy Create free account
hub / github.com/apache/cloudberry / pg_GSS_startup

Function pg_GSS_startup

src/interfaces/libpq/fe-auth.c:156–187  ·  view source on GitHub ↗

* Send initial GSS authentication token */

Source from the content-addressed store, hash-verified

154 * Send initial GSS authentication token
155 */
156static int
157pg_GSS_startup(PGconn *conn, int payloadlen)
158{
159 int ret;
160 char *host = conn->connhost[conn->whichhost].host;
161
162 if (!(host && host[0] != '\0'))
163 {
164 appendPQExpBufferStr(&conn->errorMessage,
165 libpq_gettext("host name must be specified\n"));
166 return STATUS_ERROR;
167 }
168
169 if (conn->gctx)
170 {
171 appendPQExpBufferStr(&conn->errorMessage,
172 libpq_gettext("duplicate GSS authentication request\n"));
173 return STATUS_ERROR;
174 }
175
176 ret = pg_GSS_load_servicename(conn);
177 if (ret != STATUS_OK)
178 return ret;
179
180 /*
181 * Initial packet is the same as a continuation packet with no initial
182 * context.
183 */
184 conn->gctx = GSS_C_NO_CONTEXT;
185
186 return pg_GSS_continue(conn, payloadlen);
187}
188#endif /* ENABLE_GSS */
189
190

Callers 1

pg_fe_sendauthFunction · 0.85

Calls 4

appendPQExpBufferStrFunction · 0.85
libpq_gettextFunction · 0.85
pg_GSS_load_servicenameFunction · 0.85
pg_GSS_continueFunction · 0.85

Tested by

no test coverage detected