[git commit] bootchartd: prevent premature stop by device mapper
Denys Vlasenko
vda.linux at googlemail.com
Thu Jul 20 11:39:41 UTC 2017
commit: https://git.busybox.net/busybox/commit/?id=9e2e0ff4ba7f4327ff35e353faba5bf234a70672
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Kernel thread kdmflush was recognized as display manager kdm,
check for string length.
Signed-off-by: Uwe Geuder <busybox2017-ugeuder at snkmail.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
init/bootchartd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/init/bootchartd.c b/init/bootchartd.c
index ecbcab8..1b70067 100644
--- a/init/bootchartd.c
+++ b/init/bootchartd.c
@@ -171,7 +171,9 @@ static int dump_procs(FILE *fp, int look_for_login_process)
p++;
strchrnul(p, ')')[0] = '\0';
/* Is it gdm, kdm or a getty? */
- if (((p[0] == 'g' || p[0] == 'k' || p[0] == 'x') && p[1] == 'd' && p[2] == 'm')
+ if (((p[0] == 'g' || p[0] == 'k' || p[0] == 'x')
+ && p[1] == 'd' && p[2] == 'm' && p[3] == '\0'
+ )
|| strstr(p, "getty")
) {
found_login_process = 1;
More information about the busybox-cvs
mailing list