mirror of
https://github.com/clearml/dropbear
synced 2025-02-07 13:21:15 +00:00
Turn ChanSess's tty and term attributes into char *
This commit is contained in:
parent
7928d83b02
commit
9f97511356
@ -45,8 +45,8 @@ struct ChanSess {
|
||||
/* pty details */
|
||||
int master; /* the master terminal fd*/
|
||||
int slave;
|
||||
unsigned char * tty;
|
||||
unsigned char * term;
|
||||
char * tty;
|
||||
char * term;
|
||||
|
||||
/* exit details */
|
||||
struct exitinfo exit;
|
||||
|
@ -567,7 +567,7 @@ static int sessionpty(struct ChanSess * chansess) {
|
||||
return DROPBEAR_FAILURE;
|
||||
}
|
||||
|
||||
chansess->term = buf_getstring(ses.payload, &termlen);
|
||||
chansess->term = (char *) buf_getstring(ses.payload, &termlen);
|
||||
if (termlen > MAX_TERM_LEN) {
|
||||
/* TODO send disconnect ? */
|
||||
TRACE(("leave sessionpty: term len too long"))
|
||||
@ -583,7 +583,7 @@ static int sessionpty(struct ChanSess * chansess) {
|
||||
return DROPBEAR_FAILURE;
|
||||
}
|
||||
|
||||
chansess->tty = (char*)m_strdup(namebuf);
|
||||
chansess->tty = m_strdup(namebuf);
|
||||
if (!chansess->tty) {
|
||||
dropbear_exit("Out of memory"); /* TODO disconnect */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user