X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=windows%2Fwinpgen.c;h=98c2097ebb8400c7957346121e13fdd6b31192e3;hb=7acc0a2aa1377ddd575ab635d364b48fd8686fce;hp=8468f805b4d7fef9d822410e5e02f979c41b61c0;hpb=9398d230339d5bfaa94093af89a17abf33b5dfad;p=PuTTY.git diff --git a/windows/winpgen.c b/windows/winpgen.c index 8468f805..98c2097e 100644 --- a/windows/winpgen.c +++ b/windows/winpgen.c @@ -297,10 +297,12 @@ static INT_PTR CALLBACK AboutProc(HWND hwnd, UINT msg, } { + char *buildinfo_text = buildinfo("\r\n"); char *text = dupprintf - ("PuTTYgen\r\n\r\n%s\r\n\r\n%s", - ver, + ("PuTTYgen\r\n\r\n%s\r\n\r\n%s\r\n\r\n%s", + ver, buildinfo_text, "\251 " SHORT_COPYRIGHT_DETAILS ". All rights reserved."); + sfree(buildinfo_text); SetDlgItemText(hwnd, 1000, text); sfree(text); } @@ -1515,7 +1517,7 @@ void cleanup_exit(int code) int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) { - int argc; + int argc, i; char **argv; int ret; @@ -1532,36 +1534,24 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show) split_into_argv(cmdline, &argc, &argv, NULL); - if (argc > 0) { - if (!strcmp(argv[0], "-pgpfp")) { + for (i = 0; i < argc; i++) { + if (!strcmp(argv[i], "-pgpfp")) { pgp_fingerprints(); - exit(1); + return 1; + } else if (!strcmp(argv[i], "-restrict-acl") || + !strcmp(argv[i], "-restrict_acl") || + !strcmp(argv[i], "-restrictacl")) { + restrict_process_acl(); } else { /* * Assume the first argument to be a private key file, and * attempt to load it. */ - cmdline_keyfile = argv[0]; + cmdline_keyfile = argv[i]; + break; } } -#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); - MessageBox(NULL, message, "PuTTYgen Warning", - MB_ICONWARNING | MB_OK); - sfree(message); - sfree(error); - } - } -#endif - random_ref(); ret = DialogBox(hinst, MAKEINTRESOURCE(201), NULL, MainDlgProc) != IDOK;