mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-10 09:58:01 +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:
parent
8730ed5297
commit
00960d8695
@ -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",
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -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.
|
||||
*/
|
||||
|
@ -498,7 +498,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef UNPROTECT
|
||||
#if !defined UNPROTECT && !defined NO_SECURITY
|
||||
/*
|
||||
* Protect our process.
|
||||
*/
|
||||
|
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user