search for: channel_post

Displaying 6 results from an estimated 6 matches for "channel_post".

2012 Oct 22
1
[PATCH] Implement remote dynamic TCP forwarding
...nnect cctx; + int sock; + + sock = connect_to_helper(c->path, c->host_port, &cctx); + if (sock < 0) { + chan_mark_dead(c); + return; + } + + channel_register_fds(c, sock, sock, -1, 0, 1, 0); + c->connect_ctx = cctx; + + FD_SET(c->sock, writeset); + } +} + +static void +channel_post_rdynamic(Channel *c, fd_set *readset, fd_set *writeset) +{ + if (c->sock < 0) + return; + if (FD_ISSET(c->sock, writeset)) { + int err = 0; + socklen_t sz = sizeof(err); + + if (getsockopt(c->sock, SOL_SOCKET, SO_ERROR, &err, &sz) < 0) { + err = errno; + error("g...
2001 Oct 24
2
disable features
...ck_dir = NULL; +#endif /* AF_UNSPEC or AF_INET or AF_INET6 */ static int IPv4or6 = AF_UNSPEC; +#ifdef WITH_TCPFWD /* helper */ static void port_open_helper(Channel *c, char *rtype); +#endif /* -- channel core */ @@ -678,6 +683,7 @@ chan_fn *channel_pre[SSH_CHANNEL_MAX_TYPE]; chan_fn *channel_post[SSH_CHANNEL_MAX_TYPE]; +#ifdef WITH_TCPFWD static void channel_pre_listener(Channel *c, fd_set * readset, fd_set * writeset) { @@ -690,7 +696,9 @@ debug3("channel %d: waiting for connection", c->self); FD_SET(c->sock, writeset); } +#endif +#ifdef WITH_PROTO13 static voi...
2001 Feb 10
3
Protocol 2 remote forwarding patch
...annel_pre_open_20; channel_pre[SSH_CHANNEL_X11_OPEN] = &channel_pre_x11_open; channel_pre[SSH_CHANNEL_PORT_LISTENER] = &channel_pre_listener; + channel_pre[SSH2_CHANNEL_PORT_LISTENER] = &channel_pre_listener; channel_pre[SSH_CHANNEL_X11_LISTENER] = &channel_pre_listener; channel_post[SSH_CHANNEL_OPEN] = &channel_post_open_2; channel_post[SSH_CHANNEL_PORT_LISTENER] = &channel_post_port_listener; + channel_post[SSH2_CHANNEL_PORT_LISTENER] = &channel_post_port_listener; channel_post[SSH_CHANNEL_X11_LISTENER] = &channel_post_x11_listener; } @@ -1309,6 +1317,...
2000 Aug 23
1
Protocol 2 remote forwarding patch
...annel_pre_open_20; channel_pre[SSH_CHANNEL_X11_OPEN] = &channel_pre_x11_open; channel_pre[SSH_CHANNEL_PORT_LISTENER] = &channel_pre_listener; + channel_pre[SSH2_CHANNEL_PORT_LISTENER] = &channel_pre_listener; channel_pre[SSH_CHANNEL_X11_LISTENER] = &channel_pre_listener; channel_post[SSH_CHANNEL_OPEN] = &channel_post_open_2; channel_post[SSH_CHANNEL_PORT_LISTENER] = &channel_post_port_listener; + channel_post[SSH2_CHANNEL_PORT_LISTENER] = &channel_post_port_listener; channel_post[SSH_CHANNEL_X11_LISTENER] = &channel_post_x11_listener; } @@ -1275,6 +1290,...
2010 Jan 14
1
ssh(1) multiplexing rewrite
...; c->extended_usage = extusage; @@ -323,6 +322,9 @@ channel_new(char *ctype, int type, int r c->output_filter = NULL; c->filter_ctx = NULL; c->filter_cleanup = NULL; + c->ctl_chan = -1; + c->mux_rcb = NULL; + c->mux_ctx = NULL; c->delayed = 1; /* prevent call to channel_post handler */ TAILQ_INIT(&c->status_confirms); debug("channel %d: new [%s]", found, remote_name); @@ -365,11 +367,10 @@ channel_close_fd(int *fdp) static void channel_close_fds(Channel *c) { - debug3("channel %d: close_fds r %d w %d e %d c %d", - c->self, c-&gt...
2023 Apr 06
1
[Bug 3560] New: Memory leak in channels.c
...mindrot.org Reporter: m.schmidt at emtec.com Created attachment 3690 --> https://bugzilla.mindrot.org/attachment.cgi?id=3690&action=edit A few lines of code to fix the channels leak. Function channel_free_all(struct ssh *ssh) misses to free some of its elements: - channel_pre - channel_post - and the permitted_user and permitted_adm from local and remote perms This was found through a memory leaking tool (I'm building on Windows Visual Studio with memory leaks enabled). I would suggest to add something akin to the attached to the bottom of channel_free_all(struct ssh *ssh) --...