Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/PuTTYNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'windows/utils/agent_named_pipe_name.c')
-rw-r--r--windows/utils/agent_named_pipe_name.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/windows/utils/agent_named_pipe_name.c b/windows/utils/agent_named_pipe_name.c
new file mode 100644
index 00000000..aa64b3f6
--- /dev/null
+++ b/windows/utils/agent_named_pipe_name.c
@@ -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;
+}