*** pgsql/src/backend/libpq/auth.c 2009/01/09 10:13:18 1.178 --- pgsql/src/backend/libpq/auth.c 2009/03/22 18:06:35 1.179 *************** *** 8,14 **** * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.177 2009/01/07 13:09:21 mha Exp $ * *------------------------------------------------------------------------- */ --- 8,14 ---- * * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.178 2009/01/09 10:13:18 mha Exp $ * *------------------------------------------------------------------------- */ *************** pg_GSS_recvauth(Port *port) *** 1084,1094 **** */ #ifdef ENABLE_SSPI static void ! pg_SSPI_error(int severity, char *errmsg, SECURITY_STATUS r) { char sysmsg[256]; ! if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, r, 0, sysmsg, sizeof(sysmsg), NULL) == 0) ereport(severity, (errmsg_internal("%s", errmsg), errdetail("SSPI error %x", (unsigned int) r))); --- 1084,1095 ---- */ #ifdef ENABLE_SSPI static void ! pg_SSPI_error(int severity, const char *errmsg, SECURITY_STATUS r) { char sysmsg[256]; ! if (FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, r, 0, ! sysmsg, sizeof(sysmsg), NULL) == 0) ereport(severity, (errmsg_internal("%s", errmsg), errdetail("SSPI error %x", (unsigned int) r))); *************** pg_SSPI_recvauth(Port *port) *** 1150,1157 **** &sspicred, &expiry); if (r != SEC_E_OK) ! pg_SSPI_error(ERROR, ! gettext_noop("could not acquire SSPI credentials handle"), r); /* * Loop through SSPI message exchange. This exchange can consist of --- 1151,1157 ---- &sspicred, &expiry); if (r != SEC_E_OK) ! pg_SSPI_error(ERROR, _("could not acquire SSPI credentials"), r); /* * Loop through SSPI message exchange. This exchange can consist of *************** pg_SSPI_recvauth(Port *port) *** 1240,1246 **** } FreeCredentialsHandle(&sspicred); pg_SSPI_error(ERROR, ! gettext_noop("could not accept SSPI security context"), r); } if (sspictx == NULL) --- 1240,1246 ---- } FreeCredentialsHandle(&sspicred); pg_SSPI_error(ERROR, ! _("could not accept SSPI security context"), r); } if (sspictx == NULL) *************** pg_SSPI_recvauth(Port *port) *** 1296,1302 **** { FreeLibrary(secur32); pg_SSPI_error(ERROR, ! gettext_noop("could not get security token from context"), r); } FreeLibrary(secur32); --- 1296,1302 ---- { FreeLibrary(secur32); pg_SSPI_error(ERROR, ! _("could not get token from SSPI security context"), r); } FreeLibrary(secur32);