From a3c3f3829d64a8b50ca4c502c398ca5a439b10e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 27 Feb 2024 16:35:47 +0800 Subject: [PATCH] Shell (Linux): always detect tty id --- src/detection/terminalshell/terminalshell_linux.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/detection/terminalshell/terminalshell_linux.c b/src/detection/terminalshell/terminalshell_linux.c index 286cdc662..8af68f598 100644 --- a/src/detection/terminalshell/terminalshell_linux.c +++ b/src/detection/terminalshell/terminalshell_linux.c @@ -148,12 +148,7 @@ static const char* getProcessNameAndPpid(pid_t pid, char* name, pid_t* ppid, int return "sscanf(stat) failed"; if (tty) - { - if ((tty_ >> 8) == 0x88) - *tty = tty_ & 0xFF; - else - *tty = -1; - } + *tty = tty_ & 0xFF; #elif defined(__APPLE__)