GSS warnings

Started by Kris Jurkaalmost 19 years ago4 messagespatches
Jump to latest
#1Kris Jurka
books@ejurka.com

The attached patch fixes the following warnings in src/backend/libpq

auth.c:496: warning: passing argument 2 of 'gss_release_cred' from
incompatible pointer type
pqcomm.c:182: warning: passing argument 2 of 'gss_delete_sec_context' from
incompatible pointer type
pqcomm.c:185: warning: passing argument 2 of 'gss_release_cred' from
incompatible pointer type

Parts of the GSS API want the object while others want pointers to the
object and it looks like this code got it backwards. I haven't tested
these changes, but they look right to me.

Kris Jurka

Attachments:

gss-warn.patchtext/plain; charset=US-ASCII; name=gss-warn.patchDownload+6-6
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kris Jurka (#1)
Re: GSS warnings

Kris Jurka <books@ejurka.com> writes:

Parts of the GSS API want the object while others want pointers to the
object and it looks like this code got it backwards. I haven't tested
these changes, but they look right to me.

Wouldn't the code fail entirely if it was wrong in that way?

regards, tom lane

#3Kris Jurka
books@ejurka.com
In reply to: Tom Lane (#2)
Re: GSS warnings

On Wed, 5 Sep 2007, Tom Lane wrote:

Kris Jurka <books@ejurka.com> writes:

Parts of the GSS API want the object while others want pointers to the
object and it looks like this code got it backwards. I haven't tested
these changes, but they look right to me.

Wouldn't the code fail entirely if it was wrong in that way?

Only if it was ever run. My suspicion is that Port->gss->ctx/cred are
never set to anything other than GSS_C_NO_CONTEXT and GSS_C_NO_CREDENTIAL.
This patch also clarifies the checking we're doing on cleanup to be
more clear about whether these are pointers or not.

Kris Jurka

Attachments:

gss-warn-2.patchtext/plain; charset=US-ASCII; name=gss-warn-2.patchDownload+10-10
#4Bruce Momjian
bruce@momjian.us
In reply to: Kris Jurka (#3)
Re: GSS warnings

Patch applied. Thanks.

---------------------------------------------------------------------------

Kris Jurka wrote:

On Wed, 5 Sep 2007, Tom Lane wrote:

Kris Jurka <books@ejurka.com> writes:

Parts of the GSS API want the object while others want pointers to the
object and it looks like this code got it backwards. I haven't tested
these changes, but they look right to me.

Wouldn't the code fail entirely if it was wrong in that way?

Only if it was ever run. My suspicion is that Port->gss->ctx/cred are
never set to anything other than GSS_C_NO_CONTEXT and GSS_C_NO_CREDENTIAL.
This patch also clarifies the checking we're doing on cleanup to be
more clear about whether these are pointers or not.

Kris Jurka

Content-Description:

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +