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 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include "includes.h" | 26 | #include "includes.h" |
27 | RCSID("$OpenBSD: misc.c,v 1.32 2005/06/17 02:44:32 djm Exp $"); | 27 | RCSID("$OpenBSD: misc.c,v 1.33 2005/07/04 00:58:43 djm Exp $"); |
28 | 28 | ||
29 | #include "misc.h" | 29 | #include "misc.h" |
30 | #include "log.h" | 30 | #include "log.h" |
@@ -506,3 +506,20 @@ read_keyfile_line(FILE *f, const char *filename, char *buf, size_t bufsz, | |||
506 | } | 506 | } |
507 | return -1; | 507 | return -1; |
508 | } | 508 | } |
509 | |||
510 | char * | ||
511 | tohex(const u_char *d, u_int l) | ||
512 | { | ||
513 | char b[3], *r; | ||
514 | u_int i, hl; | ||
515 | |||
516 | hl = l * 2 + 1; | ||
517 | r = xmalloc(hl); | ||
518 | *r = '\0'; | ||
519 | for (i = 0; i < l; i++) { | ||
520 | snprintf(b, sizeof(b), "%02x", d[i]); | ||
521 | strlcat(r, b, hl); | ||
522 | } | ||
523 | return (r); | ||
524 | } | ||
525 | |||