#include "ssh.h"
#include "misc.h"
#include "tree234.h"
+#include "winsecur.h"
#include <shellapi.h>
static tree234 *rsakeys, *ssh2keys;
static int has_security;
-#ifndef NO_SECURITY
-DECL_WINDOWS_FUNCTION(extern, DWORD, GetSecurityInfo,
- (HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION,
- PSID *, PSID *, PACL *, PACL *,
- PSECURITY_DESCRIPTOR *));
-#endif
/*
* Forward references
{
WNDCLASS wndclass;
MSG msg;
- HMODULE advapi;
char *command = NULL;
int added_keys = 0;
int argc, i;
/*
* Attempt to get the security API we need.
*/
- if (!init_advapi()) {
+ if (!got_advapi()) {
MessageBox(NULL,
"Unable to access security APIs. Pageant will\n"
"not run, in case it causes a security breach.",
"Pageant Fatal Error", MB_ICONERROR | MB_OK);
return 1;
#endif
- } else
- advapi = NULL;
+ }
/*
* See if we can find our Help file.
for (i = 0; i < argc; i++) {
if (!strcmp(argv[i], "-pgpfp")) {
pgp_fingerprints();
- if (advapi)
- FreeLibrary(advapi);
return 1;
} else if (!strcmp(argv[i], "-c")) {
/*
MessageBox(NULL, "Pageant is already running", "Pageant Error",
MB_ICONERROR | MB_OK);
}
- if (advapi)
- FreeLibrary(advapi);
return 0;
}
if (keypath) filereq_free(keypath);
- if (advapi)
- FreeLibrary(advapi);
-
cleanup_exit(msg.wParam);
return msg.wParam; /* just in case optimiser complains */
}