agent_named_pipe_name.c 447 B

123456789101112131415161718
  1. /*
  2. * Return the full pathname of the named pipe Pageant will listen on.
  3. * Used by both the Pageant server code and client code.
  4. */
  5. #include "putty.h"
  6. #include "cryptoapi.h"
  7. char *agent_named_pipe_name(void)
  8. {
  9. char *username = get_username();
  10. char *suffix = capi_obfuscate_string("Pageant");
  11. char *pipename = dupprintf("\\\\.\\pipe\\pageant.%s.%s", username, suffix);
  12. sfree(username);
  13. sfree(suffix);
  14. return pipename;
  15. }