]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winplink.c
Turn off Windows process ACL restriction by default.
[PuTTY.git] / windows / winplink.c
index 99e269fdc106687e7edff5c51fb778ee22d545b7..0f86b41c648dbf6b978fd97a10b119dbe0c362d2 100644 (file)
@@ -223,7 +223,9 @@ static void usage(void)
 
 static void version(void)
 {
-    printf("plink: %s\n", ver);
+    char *buildinfo_text = buildinfo("\n");
+    printf("plink: %s\n%s\n", ver, buildinfo_text);
+    sfree(buildinfo_text);
     exit(1);
 }
 
@@ -312,6 +314,8 @@ int main(int argc, char **argv)
     int just_test_share_exists = FALSE;
     unsigned long now, next, then;
 
+    dll_hijacking_protection();
+
     sklist = NULL;
     skcount = sksize = 0;
     /*
@@ -498,22 +502,6 @@ int main(int argc, char **argv)
        }
     }
 
-#if !defined UNPROTECT && !defined NO_SECURITY
-    /*
-     * 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;