comparison svr-chansession.c @ 572:8fd0ac8c8cab

Move remotehost into svr_ses structure since we can't look it up once we've forked (the connection socket has been closed). Fixes inetd mode.
author Matt Johnston <matt@ucc.asn.au>
date Sat, 05 Sep 2009 11:40:00 +0000
parents 6f472dc54da7
children 6cb1bd7be8b3
comparison
equal deleted inserted replaced
571:281ed8384eb4 572:8fd0ac8c8cab
251 251
252 } 252 }
253 253
254 static struct logininfo* 254 static struct logininfo*
255 chansess_login_alloc(struct ChanSess *chansess) { 255 chansess_login_alloc(struct ChanSess *chansess) {
256 char *remotehost;
257 struct logininfo * li; 256 struct logininfo * li;
258 get_socket_address(ses.sock_in, NULL, NULL, &remotehost, NULL, 1);
259 li = login_alloc_entry(chansess->pid, ses.authstate.username, 257 li = login_alloc_entry(chansess->pid, ses.authstate.username,
260 remotehost, chansess->tty); 258 svr_ses.remotehost, chansess->tty);
261 m_free(remotehost);
262 return li; 259 return li;
263 } 260 }
264 261
265 /* clean a session channel */ 262 /* clean a session channel */
266 static void closechansess(struct Channel *channel) { 263 static void closechansess(struct Channel *channel) {