Re: Kerberos support broken on MSVC builds for Windows x64? - Mailing list pgsql-hackers

From Dave Page
Subject Re: Kerberos support broken on MSVC builds for Windows x64?
Date
Msg-id CA+OCxowv8-AjUe7YWN_TdNPMoGDFMvG3KLR6Ne0L8B5geVUVrg@mail.gmail.com
Whole thread Raw
In response to Re: Kerberos support broken on MSVC builds for Windows x64?  (Stephen Frost <sfrost@snowman.net>)
Responses Re: Kerberos support broken on MSVC builds for Windows x64?  (Stephen Frost <sfrost@snowman.net>)
Re: Kerberos support broken on MSVC builds for Windows x64?  (Dave Page <dpage@pgadmin.org>)
List pgsql-hackers
Hi

On Tue, Sep 1, 2020 at 5:29 PM Stephen Frost <sfrost@snowman.net> wrote:
Greetings,

* Dave Page (dpage@pgadmin.org) wrote:
> Attached is a patch against 12.4 for the build system in case anyone wants
> to play (I'll do it properly against the head branch later). I'm guessing
> this will work for < 12, as with 12 I'm now getting the following which
> looks like it's related to GSS encryption:
>
> "C:\Users\dpage\Downloads\postgresql-12.4\pgsql.sln" (default target) (1) ->
> "C:\Users\dpage\Downloads\postgresql-12.4\pgcrypto.vcxproj" (default
> target) (2) ->
> "C:\Users\dpage\Downloads\postgresql-12.4\postgres.vcxproj" (default
> target) (3) ->
> (Link target) ->
>   be-secure-gssapi.obj : error LNK2019: unresolved external symbol setenv
> referenced in function secure_open_gssapi
> [C:\Users\dpage\Downloads\postgresql-12.4\postgres.vcxproj]
>   .\Release\postgres\postgres.exe : fatal error LNK1120: 1 unresolved
> externals [C:\Users\dpage\Downloads\postgresql-12.4\postgres.vcxproj]
>
> I'll dig into that some more.

Yes, that'd be in the GSSENC code, which I hadn't been expecting to be
used under Windows.  If you're successful, I don't have any issue
helping to make that work, though I'm curious if you're trying to build
with MIT KfW (which is rather ancient these days, being based on krb5
1.13 and not updated since..) or with a more current release...?

I'm currently using the KFW 4.1 build from MIT. I've tried building it myself but it requires a very old toolchain (which defeated the point of what I was trying to do at the time).

I haven't yet looked to see if the source for krb5-1.8.2 will build or even has the right bits in it for Windows - as I'm sure you know MIT seem to maintain an entirely different version for Windows for which I assume there's a reason.
 

Of course, it'd be good to get a buildfarm animal in place that's
actually testing this if we're going to make it work.

Fixing the config on hamerkop should deal with that I think. Though I am confused as to why the Buildfarm UI thinks it has Kerberos support enabled - did we change the config parameter from krb5 to gss some time prior to 9.5? If so, that could explain it.
 

Regarding the setenv() call, should be able to use pgwin32_putenv() in
place on Windows, I'd think..?

Right, I imagine so. It's on my todo... 


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: Gavin Flower
Date:
Subject: Re: builtin functions, parameter names and psql's \df
Next
From: Michael Paquier
Date:
Subject: Re: Include access method in listTables output