mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Merge branch 'pre-0.67'
This commit is contained in:
@ -13,10 +13,10 @@
|
||||
|
||||
[Setup]
|
||||
AppName=PuTTY
|
||||
AppVerName=PuTTY version 0.66
|
||||
VersionInfoTextVersion=Release 0.66
|
||||
AppVersion=0.66
|
||||
VersionInfoVersion=0.66.0.0
|
||||
AppVerName=PuTTY version 0.67
|
||||
VersionInfoTextVersion=Release 0.67
|
||||
AppVersion=0.67
|
||||
VersionInfoVersion=0.67.0.0
|
||||
AppPublisher=Simon Tatham
|
||||
AppPublisherURL=http://www.chiark.greenend.org.uk/~sgtatham/putty/
|
||||
AppReadmeFile={app}\README.txt
|
||||
|
@ -79,7 +79,6 @@ Socket new_named_pipe_client(const char *pipename, Plug plug)
|
||||
ret = new_error_socket(err, plug);
|
||||
sfree(err);
|
||||
CloseHandle(pipehandle);
|
||||
sfree(usersid);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -89,12 +88,10 @@ Socket new_named_pipe_client(const char *pipename, Plug plug)
|
||||
sfree(err);
|
||||
CloseHandle(pipehandle);
|
||||
LocalFree(psd);
|
||||
sfree(usersid);
|
||||
return ret;
|
||||
}
|
||||
|
||||
LocalFree(psd);
|
||||
sfree(usersid);
|
||||
|
||||
return make_handle_socket(pipehandle, pipehandle, NULL, plug, TRUE);
|
||||
}
|
||||
|
@ -921,7 +921,6 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
||||
debug(("couldn't get default SID\n"));
|
||||
#endif
|
||||
CloseHandle(filemap);
|
||||
sfree(ourself);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -934,7 +933,6 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
||||
rc));
|
||||
#endif
|
||||
CloseHandle(filemap);
|
||||
sfree(ourself);
|
||||
sfree(ourself2);
|
||||
return 0;
|
||||
}
|
||||
@ -955,7 +953,6 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
||||
!EqualSid(mapowner, ourself2)) {
|
||||
CloseHandle(filemap);
|
||||
LocalFree(psd);
|
||||
sfree(ourself);
|
||||
sfree(ourself2);
|
||||
return 0; /* security ID mismatch! */
|
||||
}
|
||||
@ -963,7 +960,6 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
|
||||
debug(("security stuff matched\n"));
|
||||
#endif
|
||||
LocalFree(psd);
|
||||
sfree(ourself);
|
||||
sfree(ourself2);
|
||||
} else {
|
||||
#ifdef DEBUG_IPC
|
||||
|
@ -182,6 +182,5 @@ int agent_query(void *in, int inlen, void **out, int *outlen,
|
||||
sfree(mapname);
|
||||
if (psd)
|
||||
LocalFree(psd);
|
||||
sfree(usersid);
|
||||
return 1;
|
||||
}
|
||||
|
@ -44,6 +44,9 @@ PSID get_user_sid(void)
|
||||
DWORD toklen, sidlen;
|
||||
PSID sid = NULL, ret = NULL;
|
||||
|
||||
if (usersid)
|
||||
return usersid;
|
||||
|
||||
if (!got_advapi())
|
||||
goto cleanup;
|
||||
|
||||
@ -73,7 +76,7 @@ PSID get_user_sid(void)
|
||||
|
||||
/* Success. Move sid into the return value slot, and null it out
|
||||
* to stop the cleanup code freeing it. */
|
||||
ret = sid;
|
||||
ret = usersid = sid;
|
||||
sid = NULL;
|
||||
|
||||
cleanup:
|
||||
|
Reference in New Issue
Block a user