PostgreSQL Source Code  git master
be-gssapi-common.h File Reference
#include <gssapi/gssapi.h>
Include dependency graph for be-gssapi-common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


void pg_GSS_error (const char *errmsg, OM_uint32 maj_stat, OM_uint32 min_stat)

Function Documentation

◆ pg_GSS_error()

void pg_GSS_error ( const char *  errmsg,
OM_uint32  maj_stat,
OM_uint32  min_stat 

Definition at line 74 of file be-gssapi-common.c.

References COMMERROR, ereport, errdetail_internal(), errmsg_internal(), and pg_GSS_error_int().

Referenced by be_gssapi_read(), be_gssapi_write(), CheckSCRAMAuth(), pg_GSS_read(), pg_GSS_write(), pqsecure_open_gss(), and secure_open_gssapi().

76 {
77  char msg_major[128],
78  msg_minor[128];
80  /* Fetch major status message */
81  pg_GSS_error_int(msg_major, sizeof(msg_major), maj_stat, GSS_C_GSS_CODE);
83  /* Fetch mechanism minor status message */
84  pg_GSS_error_int(msg_minor, sizeof(msg_minor), min_stat, GSS_C_MECH_CODE);
86  /*
87  * errmsg_internal, since translation of the first part must be done
88  * before calling this function anyway.
89  */
91  (errmsg_internal("%s", errmsg),
92  errdetail_internal("%s: %s", msg_major, msg_minor)));
93 }
int errdetail_internal(const char *fmt,...)
Definition: elog.c:1069
static void pg_GSS_error_int(char *s, size_t len, OM_uint32 stat, int type)
Definition: elog.h:30
#define ereport(elevel,...)
Definition: elog.h:157
int errmsg_internal(const char *fmt,...)
Definition: elog.c:996
int errmsg(const char *fmt,...)
Definition: elog.c:909