diff --git a/src/TEShell.C b/src/TEShell.C index fd557150..9344879d 100644 --- a/src/TEShell.C +++ b/src/TEShell.C @@ -102,7 +102,7 @@ void Shell::makeShell(const char* dev, QStrList & args, // only used internally. See `run' for interface { int sig; char* t; // open and set all standard files to master/slave tty - int tt = open(dev, O_RDWR); + int tt = open(dev, O_RDWR | O_EXCL); //reset signal handlers for child process for (sig = 1; sig < NSIG; sig++) signal(sig,SIG_DFL); @@ -134,11 +134,13 @@ void Shell::makeShell(const char* dev, QStrList & args, close(open(dev, O_WRONLY, 0)); // clients (bash,vi). Because bash setpgid(0,0); // heals this, use '-e' to test it. +/* #if defined(TIOCSPTLCK) int flag = 1; // Linux-only security solution: if (ioctl(fd,TIOCSPTLCK,&flag)) // prohibit opening tty from now on #endif perror("Warning: The session is insecure."); +*/ close(fd); // drop privileges diff --git a/src/TEmuVt102.C b/src/TEmuVt102.C index 1419f00b..c95bad8d 100644 --- a/src/TEmuVt102.C +++ b/src/TEmuVt102.C @@ -778,8 +778,8 @@ void VT102Emulation::onKeyPress( QKeyEvent* ev ) case Key_F11 : sendString("\033[23~" ); return; case Key_F12 : sendString("\033[24~" ); return; - case Key_Home : sendString("\033[7~" ); return; - case Key_End : sendString("\033[8~" ); return; + case Key_Home : sendString("\033[H" ); return; + case Key_End : sendString("\033[F" ); return; case Key_Prior : sendString("\033[5~" ); return; case Key_Next : sendString("\033[6~" ); return; case Key_Insert : sendString("\033[2~" ); return;