Re: Bump MIN_WINNT to 0x0600 (Vista) as minimal runtime in 16~

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Andrew Dunstan <andrew@dunslane.net>, Thomas Munro <thomas.munro@gmail.com>, Daniel Gustafsson <daniel@yesql.se>, Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>, pgsql-hackers@lists.postgresql.org
Date: 2022-08-27T05:35:25Z
Lists: pgsql-hackers

Attachments

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

Commits

  1. doc: Fix incorrect version list for Windows SDK

  2. Replace loading of ldap_start_tls_sA() by direct function call

  3. Replace load of functions by direct calls for some WIN32

  4. Cleanup more code and comments related to Windows NT4 (XP days)

  5. Make Windows 10 the minimal runtime requirement for WIN32