mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Move agent_named_pipe_name into its own source file.
It's used by server and client, so it seems silly to have it live in the client code.
This commit is contained in:
17
windows/utils/agent_named_pipe_name.c
Normal file
17
windows/utils/agent_named_pipe_name.c
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Return the full pathname of the named pipe Pageant will listen on.
|
||||
* Used by both the Pageant server code and client code.
|
||||
*/
|
||||
|
||||
#include "putty.h"
|
||||
#include "cryptoapi.h"
|
||||
|
||||
char *agent_named_pipe_name(void)
|
||||
{
|
||||
char *username = get_username();
|
||||
char *suffix = capi_obfuscate_string("Pageant");
|
||||
char *pipename = dupprintf("\\\\.\\pipe\\pageant.%s.%s", username, suffix);
|
||||
sfree(username);
|
||||
sfree(suffix);
|
||||
return pipename;
|
||||
}
|
Reference in New Issue
Block a user