diff options
author | Damien Miller <djm@mindrot.org> | 2005-07-06 09:44:19 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2005-07-06 09:44:19 +1000 |
commit | 1339002e8b05d89b10767849d9ee9be55e460f4c (patch) | |
tree | 58e307b74579313f31732dfdf21f756d6a051ce9 /misc.c | |
parent | a7270309fc5e95b29c91d0190b13ef5a9b1df339 (diff) |
- djm@cvs.openbsd.org 2005/07/04 00:58:43
[channels.c clientloop.c clientloop.h misc.c misc.h ssh.c ssh_config.5]
implement support for X11 and agent forwarding over multiplex slave
connections. Because of protocol limitations, the slave connections inherit
the master's DISPLAY and SSH_AUTH_SOCK rather than distinctly forwarding
their own.
ok dtucker@ "put it in" deraadt@
Diffstat (limited to 'misc.c')
-rw-r--r-- | misc.c | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -24,7 +24,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: misc.c,v 1.32 2005/06/17 02:44:32 djm Exp $"); +RCSID("$OpenBSD: misc.c,v 1.33 2005/07/04 00:58:43 djm Exp $"); #include "misc.h" #include "log.h" @@ -506,3 +506,20 @@ read_keyfile_line(FILE *f, const char *filename, char *buf, size_t bufsz, } return -1; } + +char * +tohex(const u_char *d, u_int l) +{ + char b[3], *r; + u_int i, hl; + + hl = l * 2 + 1; + r = xmalloc(hl); + *r = '\0'; + for (i = 0; i < l; i++) { + snprintf(b, sizeof(b), "%02x", d[i]); + strlcat(r, b, hl); + } + return (r); +} + |