From: Ross Burton Date: Mon, 13 Aug 2018 18:02:26 +0000 (+0100) Subject: bitbake: checksum: sanity check path when recursively checksumming X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=63a4ff7cf5f7d1671ab85800bc2212dd9cd9748d;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git bitbake: checksum: sanity check path when recursively checksumming In case something goes tragically wrong, catch a request to checksum / and refuse. (Bitbake rev: e7cd4c86ef8a2c2bbf068e84c83fdc9e052b6e3d) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/bitbake/lib/bb/checksum.py b/bitbake/lib/bb/checksum.py index 84289208f44..4e1598fe835 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: