Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~ - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~
Date
Msg-id YwmtHRRoA5gQi7lZ@paquier.xyz
Whole thread Raw
In response to Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~  (Justin Pryzby <pryzby@telsasoft.com>)
Responses Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~
List pgsql-hackers
On Fri, Aug 26, 2022 at 06:26:37AM -0500, Justin Pryzby wrote:
> If I'm not wrong, there's some lingering comments which could be removed since
> 495ed0ef2.

It seems to me that you are right.  I have not thought about looking
at references to NT.  Good catches!

> src/bin/pg_ctl/pg_ctl.c: * on NT4. That way, we don't break on NT4.
> src/bin/pg_ctl/pg_ctl.c: * On NT4, or any other system not containing the required functions, will
> src/bin/pg_ctl/pg_ctl.c:                 * NT4 doesn't have CreateRestrictedToken, so just call ordinary
> src/port/dirmod.c: *    Win32 (NT4 and newer).
> src/backend/port/win32/socket.c:                /* No error, zero bytes (win2000+) or error+WSAEWOULDBLOCK (<=nt4)
*/

There is also a reference to Nt4 in win32.c, for a comment that is
irrelevant now, so it can be IMO removed.

There may be a point in enforcing CreateProcess() if
CreateRestrictedToken() cannot be loaded, but that would be a security
issue if Windows goes crazy as we should always expect the function,
so this had better return an error.

So, what do you think about the attached?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: windows cfbot failing: my_perl
Next
From: John Naylor
Date:
Subject: Re: windows cfbot failing: my_perl