pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16775: Problem building with Kerberos (--with-gssapi) support on Windows
3+ messages / 3 participants
[nested] [flat]

* BUG #16775: Problem building with Kerberos (--with-gssapi) support on Windows
@ 2020-12-14 21:32  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2020-12-14 21:32 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: uwe.benner@posteo.de

The following bug has been logged on the website:

Bug reference:      16775
Logged by:          Uwe Benner
Email address:      uwe.benner@posteo.de
PostgreSQL version: 12.5
Operating system:   Windows 10
Description:        

Hello there!

I am building postgres from source on Windows, because I need a 32bit
version, and wanted to have kerberos support a.k.a. `--with-gssapi`
activated.
When compiling, it complains about the line 493 in file
src/backend/be-secure-gssapi.c [0]
```
 493         setenv("KRB5_KTNAME", pg_krb_server_keyfile, 1);
 ```
 which seams reasonable, since it seams to be the linux api call. Is it
supposed to be the linux api or does postgres itself define a setenv
function somewhere else?
 Is it okay to fix it like this?
 ```
 #ifndef WIN32
  setenv("KRB5_KTNAME", pg_krb_server_keyfile, 1);
#else
  SetEnvironmentVariable("KRB5_KTNAME", pg_krb_server_keyfile);
#endif
```

Or should `pg_setenv`[1] or something like tat be called instead? `putenv`
would be another, more or less cross platform safe option, but it's
deprecated[2] in Windows and `_putenv`/`_putenv_s` should be used instead.

And another thing, can you check if the call to `SetEnvironmentVariableA` in
the function `pg_setenv`[1] is right? I think it's a typo and should call
`SetEnvironmentVariable`.

Thanks in advance
Uwe Benner

[0]
https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/libpq/be-secure-gssapi.c;h=...
[1]
https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/bin/pg_upgrade/util.c;h=a16c794261b...
[2]
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/putenv?view=msvc-160



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #16775: Problem building with Kerberos (--with-gssapi) support on Windows
@ 2020-12-14 22:11  Tom Lane <tgl@sss.pgh.pa.us>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2020-12-14 22:11 UTC (permalink / raw)
  To: uwe.benner@posteo.de; +Cc: pgsql-bugs@lists.postgresql.org

PG Bug reporting form <noreply@postgresql.org> writes:
> I am building postgres from source on Windows, because I need a 32bit
> version, and wanted to have kerberos support a.k.a. `--with-gssapi`
> activated.
> When compiling, it complains about the line 493 in file
> src/backend/be-secure-gssapi.c [0]
>  493         setenv("KRB5_KTNAME", pg_krb_server_keyfile, 1);

Huh, is there suddenly some great groundswell of interest in
GSSAPI on Windows?  Anywhere, see near-duplicate report from
earlier today:

https://www.postgresql.org/message-id/flat/16773-c0bb1bc300bde127%40postgresql.org

and the earlier discussions that links to.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #16775: Problem building with Kerberos (--with-gssapi) support on Windows
@ 2020-12-15 14:14  Uwe Benner <uwe.benner@posteo.de>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Uwe Benner @ 2020-12-15 14:14 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org

> Am 14.12.2020 um 23:11 schrieb Tom Lane <tgl@sss.pgh.pa.us>:
> 
> PG Bug reporting form <noreply@postgresql.org> writes:
>> I am building postgres from source on Windows, because I need a 32bit
>> version, and wanted to have kerberos support a.k.a. `--with-gssapi`
>> activated.
>> When compiling, it complains about the line 493 in file
>> src/backend/be-secure-gssapi.c [0]
>> 493         setenv("KRB5_KTNAME", pg_krb_server_keyfile, 1);
> 
> Huh, is there suddenly some great groundswell of interest in
> GSSAPI on Windows?  Anywhere, see near-duplicate report from
> earlier today:
> 
> https://www.postgresql.org/message-id/flat/16773-c0bb1bc300bde127%40postgresql.org
> 
> and the earlier discussions that links to.
> 
>            regards, tom lane

Hah I don't think so. 
Anyways thanks for the link!

Kind regards,
Uwe Benner





^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2020-12-15 14:14 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 21:32 BUG #16775: Problem building with Kerberos (--with-gssapi) support on Windows PG Bug reporting form <noreply@postgresql.org>
2020-12-14 22:11 ` Tom Lane <tgl@sss.pgh.pa.us>
2020-12-15 14:14   ` Uwe Benner <uwe.benner@posteo.de>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox