X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwindow.c;h=fc51e57fb2b5fbbe95fbdc37d76831dd7cee2e82;hb=21101c7397e460933635a7bfed813864fc4f88fe;hp=db42634731f6258372752890bf6781f699ddbe08;hpb=48db456801cf90369330248075b7e480252696ff;p=PuTTY.git diff --git a/windows/window.c b/windows/window.c index db426347..fc51e57f 100644 --- a/windows/window.c +++ b/windows/window.c @@ -395,15 +395,16 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) * Protect our process */ { - char *error = NULL; - - if (! setprocessacl(error)) { - /* FIXME: prepare to stuff this into event log somehow */ - MessageBox(NULL, "Process protection", - error, MB_OK | MB_ICONEXCLAMATION); - } - sfree(error); - +#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.