diff options
author | Uwe Geuder <busybox2017-ugeuder@snkmail.com> | 2017-07-19 22:08:08 +0300 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-07-20 13:39:41 +0200 |
commit | 9e2e0ff4ba7f4327ff35e353faba5bf234a70672 (patch) | |
tree | 74dfca7d2a7f4cd6f33bd5d1fe669666c7d56e6e /init | |
parent | 1ef3ce91c70cb6a536438132d3202ccb3eddadbc (diff) | |
download | busybox-w32-9e2e0ff4ba7f4327ff35e353faba5bf234a70672.tar.gz busybox-w32-9e2e0ff4ba7f4327ff35e353faba5bf234a70672.tar.bz2 busybox-w32-9e2e0ff4ba7f4327ff35e353faba5bf234a70672.zip |
bootchartd: prevent premature stop by device mapper
Kernel thread kdmflush was recognized as display manager kdm,
check for string length.
Signed-off-by: Uwe Geuder <busybox2017-ugeuder@snkmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'init')
-rw-r--r-- | init/bootchartd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/init/bootchartd.c b/init/bootchartd.c index ecbcab868..1b7006798 100644 --- a/init/bootchartd.c +++ b/init/bootchartd.c | |||
@@ -171,7 +171,9 @@ static int dump_procs(FILE *fp, int look_for_login_process) | |||
171 | p++; | 171 | p++; |
172 | strchrnul(p, ')')[0] = '\0'; | 172 | strchrnul(p, ')')[0] = '\0'; |
173 | /* Is it gdm, kdm or a getty? */ | 173 | /* Is it gdm, kdm or a getty? */ |
174 | if (((p[0] == 'g' || p[0] == 'k' || p[0] == 'x') && p[1] == 'd' && p[2] == 'm') | 174 | if (((p[0] == 'g' || p[0] == 'k' || p[0] == 'x') |
175 | && p[1] == 'd' && p[2] == 'm' && p[3] == '\0' | ||
176 | ) | ||
175 | || strstr(p, "getty") | 177 | || strstr(p, "getty") |
176 | ) { | 178 | ) { |
177 | found_login_process = 1; | 179 | found_login_process = 1; |