X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=unix%2Fuxagentc.c;h=3605c60124316947ab346975086eccf463fb1cd3;hb=12e019bafc75cb441e965c63e15dfceeaf71ca1e;hp=826e4394b6d6f7e5b9bb23f547c8129ca0245ffc;hpb=6eec320f0b3606f17f06a290acdbb8f84afdff00;p=PuTTY.git diff --git a/unix/uxagentc.c b/unix/uxagentc.c index 826e4394..3605c601 100644 --- a/unix/uxagentc.c +++ b/unix/uxagentc.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "putty.h" #include "misc.h" @@ -121,6 +122,8 @@ int agent_query(void *in, int inlen, void **out, int *outlen, exit(1); } + cloexec(sock); + addr.sun_family = AF_UNIX; strncpy(addr.sun_path, name, sizeof(addr.sun_path)); if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) {