From 45ef387cc54a0584807e05a952e1e4681ec4c664 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 13 Aug 2018 19:02:26 +0100 Subject: bitbake: checksum: sanity check path when recursively checksumming In case something goes tragically wrong, catch a request to checksum / and refuse. (Bitbake rev: 7444419b7fda34e14d653ba8470f5dfabb5da4f3) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- bitbake/lib/bb/checksum.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bitbake/lib') diff --git a/bitbake/lib/bb/checksum.py b/bitbake/lib/bb/checksum.py index 84289208f4..4e1598fe83 100644 --- a/bitbake/lib/bb/checksum.py +++ b/bitbake/lib/bb/checksum.py @@ -97,6 +97,8 @@ class FileChecksumCache(MultiProcessCache): def checksum_dir(pth): # Handle directories recursively + if pth == "/": + bb.fatal("Refusing to checksum /") dirchecksums = [] for root, dirs, files in os.walk(pth): for name in files: -- cgit v1.2.3-54-g00ecf