From 7d9fa1f85edfb62054f9afa3049affdba6518ceb Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Thu, 19 Nov 2020 17:08:46 +0100 Subject: [PATCH] Tombstoned check crashlog permissions (#2576) * check permission on apport crashes * check permission bits --- selfdrive/tombstoned.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selfdrive/tombstoned.py b/selfdrive/tombstoned.py index e43f9837..5a208ffc 100755 --- a/selfdrive/tombstoned.py +++ b/selfdrive/tombstoned.py @@ -21,7 +21,9 @@ def get_tombstones(): # Loop over first 1000 directory entries for _, f in zip(range(1000), d): - if f.name.startswith("tombstone") or f.name.endswith(".crash"): + if f.name.startswith("tombstone"): + files.append((f.path, int(f.stat().st_ctime))) + elif f.name.endswith(".crash") and f.stat().st_mode == 0o100640: files.append((f.path, int(f.stat().st_ctime))) return files