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