X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwindow.c;h=fc51e57fb2b5fbbe95fbdc37d76831dd7cee2e82;hb=21101c7397e460933635a7bfed813864fc4f88fe;hp=23f98a476da825ac25a66a084a5d80a8a35aee4f;hpb=009ab4a20cfd685ff20b8f922068ffa6900b92c7;p=PuTTY.git diff --git a/windows/window.c b/windows/window.c index 23f98a47..fc51e57f 100644 --- a/windows/window.c +++ b/windows/window.c @@ -19,6 +19,7 @@ #include "terminal.h" #include "storage.h" #include "win_res.h" +#include "winsecur.h" #ifndef NO_MULTIMON #include @@ -390,6 +391,21 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) return 1; } + /* + * Protect our process + */ + { +#ifndef UNPROTECT + char *error = NULL; + if (! setprocessacl(error)) { + char *message = dupprintf("Could not restrict process ACL: %s", + error); + logevent(NULL, message); + sfree(message); + sfree(error); + } +#endif + } /* * Process the command line. */