Mercurial > dropbear
diff svr-chansession.c @ 314:827f87dfbc22 ucc-axis-hack
*hack hack hack*
get rid of a few more bits
author | matt-ucc@ucc.asn.au |
---|---|
date | Mon, 27 Mar 2006 08:36:44 +0000 |
parents | fabcee551349 |
children |
line wrap: on
line diff
--- a/svr-chansession.c Sun Mar 26 13:18:30 2006 +0000 +++ b/svr-chansession.c Mon Mar 27 08:36:44 2006 +0000 @@ -131,6 +131,7 @@ TRACE(("leave sigchld handler")) } +#if 0 /* send the exit status or the signal causing termination for a session */ /* XXX server */ static void send_exitsignalstatus(struct Channel *channel) { @@ -201,6 +202,7 @@ encrypt_packet(); } +#endif /* set up a session channel */ static int newchansess(struct Channel *channel) { @@ -248,7 +250,9 @@ chansess = (struct ChanSess*)channel->typedata; +#if 0 send_exitsignalstatus(channel); +#endif TRACE(("enter closechansess")) if (chansess == NULL) { @@ -259,6 +263,7 @@ m_free(chansess->cmd); m_free(chansess->term); +#if 0 if (chansess->tty) { /* write the utmp/wtmp login record */ li = login_alloc_entry(chansess->pid, ses.authstate.username, @@ -269,6 +274,7 @@ pty_release(chansess->tty); m_free(chansess->tty); } +#endif #ifndef DISABLE_X11FWD x11cleanup(chansess); @@ -389,6 +395,7 @@ /* Send a signal to a session's process as requested by the client*/ static int sessionsignal(struct ChanSess *chansess) { +#if 0 int sig = 0; unsigned char* signame = NULL; @@ -420,6 +427,7 @@ if (kill(chansess->pid, sig) < 0) { return DROPBEAR_FAILURE; } +#endif return DROPBEAR_SUCCESS; } @@ -428,6 +436,7 @@ * client. Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */ static int sessionwinchange(struct ChanSess *chansess) { +#if 0 int termc, termr, termw, termh; if (chansess->master < 0) { @@ -442,9 +451,11 @@ pty_change_window_size(chansess->master, termr, termc, termw, termh); - return DROPBEAR_FAILURE; +#endif + return DROPBEAR_SUCCESS; } +#if 0 static void get_termmodes(struct ChanSess *chansess) { struct termios termio; @@ -535,6 +546,7 @@ } TRACE(("leave get_termmodes")) } +#endif /* Set up a session pty which will be used to execute the shell or program. * The pty is allocated now, and kept for when the shell/program executes. @@ -635,7 +647,7 @@ ret = noptycommand(channel, chansess); } else { /* want pty */ - ret = ptycommand(channel, chansess); + //ret = ptycommand(channel, chansess); } if (ret == DROPBEAR_FAILURE) { @@ -786,6 +798,7 @@ /* Execute a command or shell within a pty environment, and set up * redirection as appropriate. * Returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */ +#if 0 static int ptycommand(struct Channel *channel, struct ChanSess *chansess) { pid_t pid; @@ -832,12 +845,14 @@ close(chansess->slave); +#if 0 /* write the utmp/wtmp login record - must be after changing the * terminal used for stdout with the dup2 above */ li= login_alloc_entry(getpid(), ses.authstate.username, ses.remotehost, chansess->tty); login_login(li); login_free_entry(li); +#endif m_free(chansess->tty); @@ -893,6 +908,7 @@ TRACE(("leave ptycommand")) return DROPBEAR_SUCCESS; } +#endif /* Add the pid of a child to the list for exit-handling */ static void addchildpid(struct ChanSess *chansess, pid_t pid) {