Re: Windows: openssl & gssapi dislike each other - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Windows: openssl & gssapi dislike each other
Date
Msg-id 5lmtgcpdy3z4fptsh6bsft3mmlmswvx7jvlck5fhyzbjpmnhj7@xq55e6dlxte6
Whole thread Raw
In response to Re: Windows: openssl & gssapi dislike each other  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Windows: openssl & gssapi dislike each other
List pgsql-hackers
Hi,

On 2025-01-31 15:54:45 +0100, Daniel Gustafsson wrote:
> > On 24 Jan 2025, at 22:45, Daniel Gustafsson <daniel@yesql.se> wrote:
> > 
> >> On 24 Jan 2025, at 21:07, Andrew Dunstan <andrew@dunslane.net> wrote:
> >> On 2025-01-22 We 4:25 AM, Dave Page wrote:
> > 
> >>> Anyway, no fix was committed as far as I know. I would suggest it should be back-patched as well.
> >> 
> >> I'm quite partial to the approach suggested upthread by Andres (a separate pg_gssapi.h file). If there's agreement
onthat I'm prepared to go and make it happen, unless Daniel beats me to it. Backpatching also seems reasonable.
 
> > 
> > Thanks for the reminder, I also agree that Andres' suggestion is the best
> > option.  I hacked up a patch but got distracted by the pgcrypto GUC patch for a
> > bit.  I'll share what I have once I've done a little testing.
> 
> After another (conference induced) distraction I remembered this thread again
> and tested to build/test the patch against a GSSAPI enabled tree.  I think this
> is along the right lines.

Largely looks good to me, thanks for tackling this!


> diff --git a/src/include/libpq/libpq-be.h b/src/include/libpq/libpq-be.h
> index 2f6c29200ba..f6d8f938c83 100644
> --- a/src/include/libpq/libpq-be.h
> +++ b/src/include/libpq/libpq-be.h
> @@ -28,11 +28,7 @@
>  #include <netinet/tcp.h>
>  
>  #ifdef ENABLE_GSS
> -#if defined(HAVE_GSSAPI_H)
> -#include <gssapi.h>
> -#else
> -#include <gssapi/gssapi.h>
> -#endif                            /* HAVE_GSSAPI_H */
> +#include "libpq/pg-gssapi.h"
>  #endif                            /* ENABLE_GSS */

This #ifdef ENABLE_GSS probably isn't necessary anymore.


Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: jsonlog missing from logging_collector description
Next
From: Tom Lane
Date:
Subject: Re: postgresql.conf.sample ordering for IO, worker related GUCs