Skip to content
Snippets Groups Projects
Commit 72c7badb authored by Tom Lane's avatar Tom Lane
Browse files

Fix some warnings (probably actual bugs) generated by new GSSAPI code

when built on a 64-bit machine.  Per buildfarm results extracted by Stefan.
parent bc8d164d
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.152 2007/07/12 14:43:20 mha Exp $ * $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.153 2007/07/12 20:36:11 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -436,7 +436,7 @@ pg_GSS_recvauth(Port *port) ...@@ -436,7 +436,7 @@ pg_GSS_recvauth(Port *port)
gbuf.value = buf.data; gbuf.value = buf.data;
elog(DEBUG4, "Processing received GSS token of length %u", elog(DEBUG4, "Processing received GSS token of length %u",
gbuf.length); (unsigned int) gbuf.length);
maj_stat = gss_accept_sec_context( maj_stat = gss_accept_sec_context(
&min_stat, &min_stat,
...@@ -454,10 +454,10 @@ pg_GSS_recvauth(Port *port) ...@@ -454,10 +454,10 @@ pg_GSS_recvauth(Port *port)
/* gbuf no longer used */ /* gbuf no longer used */
pfree(buf.data); pfree(buf.data);
elog(DEBUG5, "gss_accept_sec_context major: %i, " elog(DEBUG5, "gss_accept_sec_context major: %d, "
"minor: %i, outlen: %u, outflags: %x", "minor: %d, outlen: %u, outflags: %x",
maj_stat, min_stat, maj_stat, min_stat,
port->gss->outbuf.length, gflags); (unsigned int) port->gss->outbuf.length, gflags);
if (port->gss->outbuf.length != 0) if (port->gss->outbuf.length != 0)
{ {
...@@ -465,7 +465,7 @@ pg_GSS_recvauth(Port *port) ...@@ -465,7 +465,7 @@ pg_GSS_recvauth(Port *port)
* Negotiation generated data to be sent to the client. * Negotiation generated data to be sent to the client.
*/ */
elog(DEBUG4, "sending GSS response token of length %u", elog(DEBUG4, "sending GSS response token of length %u",
port->gss->outbuf.length); (unsigned int) port->gss->outbuf.length);
sendAuthRequest(port, AUTH_REQ_GSS_CONT); sendAuthRequest(port, AUTH_REQ_GSS_CONT);
} }
...@@ -788,7 +788,7 @@ sendAuthRequest(Port *port, AuthRequest areq) ...@@ -788,7 +788,7 @@ sendAuthRequest(Port *port, AuthRequest areq)
OM_uint32 lmin_s; OM_uint32 lmin_s;
elog(DEBUG4, "sending GSS token of length %u", elog(DEBUG4, "sending GSS token of length %u",
port->gss->outbuf.length); (unsigned int) port->gss->outbuf.length);
pq_sendbytes(&buf, port->gss->outbuf.value, port->gss->outbuf.length); pq_sendbytes(&buf, port->gss->outbuf.value, port->gss->outbuf.length);
gss_release_buffer(&lmin_s, &port->gss->outbuf); gss_release_buffer(&lmin_s, &port->gss->outbuf);
...@@ -1022,13 +1022,13 @@ CheckLDAPAuth(Port *port) ...@@ -1022,13 +1022,13 @@ CheckLDAPAuth(Port *port)
/* ldap, including port number */ /* ldap, including port number */
r = sscanf(port->auth_arg, r = sscanf(port->auth_arg,
"ldap://%127[^:]:%i/%127[^;];%127[^;];%127s", "ldap://%127[^:]:%d/%127[^;];%127[^;];%127s",
server, &ldapport, basedn, prefix, suffix); server, &ldapport, basedn, prefix, suffix);
if (r < 3) if (r < 3)
{ {
/* ldaps, including port number */ /* ldaps, including port number */
r = sscanf(port->auth_arg, r = sscanf(port->auth_arg,
"ldaps://%127[^:]:%i/%127[^;];%127[^;];%127s", "ldaps://%127[^:]:%d/%127[^;];%127[^;];%127s",
server, &ldapport, basedn, prefix, suffix); server, &ldapport, basedn, prefix, suffix);
if (r >= 3) if (r >= 3)
ssl = true; ssl = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment