From 8b65fef55c688d8a52bd56f426e345671fab0303 Mon Sep 17 00:00:00 2001 From: Owen Dunn Date: Tue, 24 Nov 2015 23:12:33 +0000 Subject: [PATCH] Surround process protection with an #ifndef UNPROTECT --- windows/window.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/windows/window.c b/windows/window.c index db426347..2677145f 100644 --- a/windows/window.c +++ b/windows/window.c @@ -395,15 +395,14 @@ 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)) { + logevent(NULL, "Could not restrict process ACL: %s", + error); + } + sfree(error); +#endif } /* * Process the command line. -- 2.45.2