1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-12 08:43:53 -05:00

Extend ACL-restriction to all Windows tools.

Protecting our processes from outside interference need not be limited
to just PuTTY: there's no reason why the other SSH-speaking tools
shouldn't have the same treatment (PSFTP, PSCP, Plink), and PuTTYgen
and Pageant which handle private key material.
This commit is contained in:
Simon Tatham
2016-04-02 08:00:07 +01:00
parent b4202c917a
commit b0b5d5fbe6
9 changed files with 85 additions and 1 deletions

View File

@ -11,6 +11,7 @@
#include "putty.h"
#include "storage.h"
#include "tree234.h"
#include "winsecur.h"
#define WM_AGENT_CALLBACK (WM_APP + 4)
@ -497,6 +498,22 @@ int main(int argc, char **argv)
}
}
#ifndef UNPROTECT
/*
* Protect our process.
*/
{
char *error = NULL;
if (!setprocessacl(error)) {
char *message = dupprintf("Could not restrict process ACL: %s",
error);
logevent(NULL, message);
sfree(message);
sfree(error);
}
}
#endif
if (errors)
return 1;