version 1.249, 2013/05/16 02:00:34 |
version 1.250, 2013/05/17 00:13:13 |
|
|
unlink(xauthfile); |
unlink(xauthfile); |
rmdir(xauthdir); |
rmdir(xauthdir); |
} |
} |
if (xauthdir) |
free(xauthdir); |
xfree(xauthdir); |
free(xauthfile); |
if (xauthfile) |
|
xfree(xauthfile); |
|
|
|
/* |
/* |
* If we didn't get authentication data, just make up some |
* If we didn't get authentication data, just make up some |
|
|
if (--gc->ref_count <= 0) { |
if (--gc->ref_count <= 0) { |
TAILQ_REMOVE(&global_confirms, gc, entry); |
TAILQ_REMOVE(&global_confirms, gc, entry); |
bzero(gc, sizeof(*gc)); |
bzero(gc, sizeof(*gc)); |
xfree(gc); |
free(gc); |
} |
} |
|
|
packet_set_alive_timeouts(0); |
packet_set_alive_timeouts(0); |
|
|
chan_write_failed(c); |
chan_write_failed(c); |
} |
} |
} |
} |
xfree(cr); |
free(cr); |
} |
} |
|
|
static void |
static void |
client_abandon_status_confirm(Channel *c, void *ctx) |
client_abandon_status_confirm(Channel *c, void *ctx) |
{ |
{ |
xfree(ctx); |
free(ctx); |
} |
} |
|
|
void |
void |
|
|
out: |
out: |
signal(SIGINT, handler); |
signal(SIGINT, handler); |
enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE); |
enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE); |
if (cmd) |
free(cmd); |
xfree(cmd); |
free(fwd.listen_host); |
if (fwd.listen_host != NULL) |
free(fwd.connect_host); |
xfree(fwd.listen_host); |
|
if (fwd.connect_host != NULL) |
|
xfree(fwd.connect_host); |
|
} |
} |
|
|
/* reasons to suppress output of an escape command in help output */ |
/* reasons to suppress output of an escape command in help output */ |
|
|
buffer_append(berr, string, strlen(string)); |
buffer_append(berr, string, strlen(string)); |
s = channel_open_message(); |
s = channel_open_message(); |
buffer_append(berr, s, strlen(s)); |
buffer_append(berr, s, strlen(s)); |
xfree(s); |
free(s); |
continue; |
continue; |
|
|
case 'C': |
case 'C': |
|
|
void |
void |
client_filter_cleanup(int cid, void *ctx) |
client_filter_cleanup(int cid, void *ctx) |
{ |
{ |
xfree(ctx); |
free(ctx); |
} |
} |
|
|
int |
int |
|
|
} |
} |
} |
} |
} |
} |
if (readset) |
free(readset); |
xfree(readset); |
free(writeset); |
if (writeset) |
|
xfree(writeset); |
|
|
|
/* Terminate the session. */ |
/* Terminate the session. */ |
|
|
|
|
packet_check_eom(); |
packet_check_eom(); |
buffer_append(&stdout_buffer, data, data_len); |
buffer_append(&stdout_buffer, data, data_len); |
memset(data, 0, data_len); |
memset(data, 0, data_len); |
xfree(data); |
free(data); |
} |
} |
static void |
static void |
client_input_stderr_data(int type, u_int32_t seq, void *ctxt) |
client_input_stderr_data(int type, u_int32_t seq, void *ctxt) |
|
|
packet_check_eom(); |
packet_check_eom(); |
buffer_append(&stderr_buffer, data, data_len); |
buffer_append(&stderr_buffer, data, data_len); |
memset(data, 0, data_len); |
memset(data, 0, data_len); |
xfree(data); |
free(data); |
} |
} |
static void |
static void |
client_input_exit_status(int type, u_int32_t seq, void *ctxt) |
client_input_exit_status(int type, u_int32_t seq, void *ctxt) |
|
|
c = channel_connect_by_listen_address(listen_port, |
c = channel_connect_by_listen_address(listen_port, |
"forwarded-tcpip", originator_address); |
"forwarded-tcpip", originator_address); |
|
|
xfree(originator_address); |
free(originator_address); |
xfree(listen_address); |
free(listen_address); |
return c; |
return c; |
} |
} |
|
|
|
|
/* XXX check permission */ |
/* XXX check permission */ |
debug("client_request_x11: request from %s %d", originator, |
debug("client_request_x11: request from %s %d", originator, |
originator_port); |
originator_port); |
xfree(originator); |
free(originator); |
sock = x11_connect_display(); |
sock = x11_connect_display(); |
if (sock < 0) |
if (sock < 0) |
return NULL; |
return NULL; |
|
|
} |
} |
packet_send(); |
packet_send(); |
} |
} |
xfree(ctype); |
free(ctype); |
} |
} |
static void |
static void |
client_input_channel_req(int type, u_int32_t seq, void *ctxt) |
client_input_channel_req(int type, u_int32_t seq, void *ctxt) |
|
|
packet_put_int(c->remote_id); |
packet_put_int(c->remote_id); |
packet_send(); |
packet_send(); |
} |
} |
xfree(rtype); |
free(rtype); |
} |
} |
static void |
static void |
client_input_global_request(int type, u_int32_t seq, void *ctxt) |
client_input_global_request(int type, u_int32_t seq, void *ctxt) |
|
|
packet_send(); |
packet_send(); |
packet_write_wait(); |
packet_write_wait(); |
} |
} |
xfree(rtype); |
free(rtype); |
} |
} |
|
|
void |
void |
|
|
/* Split */ |
/* Split */ |
name = xstrdup(env[i]); |
name = xstrdup(env[i]); |
if ((val = strchr(name, '=')) == NULL) { |
if ((val = strchr(name, '=')) == NULL) { |
xfree(name); |
free(name); |
continue; |
continue; |
} |
} |
*val++ = '\0'; |
*val++ = '\0'; |
|
|
} |
} |
if (!matched) { |
if (!matched) { |
debug3("Ignored env %s", name); |
debug3("Ignored env %s", name); |
xfree(name); |
free(name); |
continue; |
continue; |
} |
} |
|
|
|
|
packet_put_cstring(name); |
packet_put_cstring(name); |
packet_put_cstring(val); |
packet_put_cstring(val); |
packet_send(); |
packet_send(); |
xfree(name); |
free(name); |
} |
} |
} |
} |
|
|