1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

Windows: condition setprocessacl() on lack of -DNO_SECURITY.

We also have the special-purpose -DUNPROTECT to disable just the ACL
changes, but if you want to compile without any Windows security API
support at all (e.g. experimentally building against winelib) then
it's easier not to have to specify both defines separately.
This commit is contained in:
Simon Tatham 2016-04-02 13:48:20 +01:00
parent 8730ed5297
commit 00960d8695
5 changed files with 5 additions and 5 deletions

View File

@ -395,7 +395,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
* Protect our process
*/
{
#ifndef UNPROTECT
#if !defined UNPROTECT && !defined NO_SECURITY
char *error = NULL;
if (! setprocessacl(error)) {
char *message = dupprintf("Could not restrict process ACL: %s",

View File

@ -1543,7 +1543,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
}
}
#ifndef UNPROTECT
#if !defined UNPROTECT && !defined NO_SECURITY
/*
* Protect our process.
*/

View File

@ -1174,7 +1174,7 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
}
}
#ifndef UNPROTECT
#if !defined UNPROTECT && !defined NO_SECURITY
/*
* Protect our process.
*/

View File

@ -498,7 +498,7 @@ int main(int argc, char **argv)
}
}
#ifndef UNPROTECT
#if !defined UNPROTECT && !defined NO_SECURITY
/*
* Protect our process.
*/

View File

@ -735,7 +735,7 @@ char *ssh_sftp_get_cmdline(const char *prompt, int no_fds_ok)
void platform_psftp_post_option_setup(void)
{
#ifndef UNPROTECT
#if !defined UNPROTECT && !defined NO_SECURITY
/*
* Protect our process.
*/