aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-08-13 19:02:26 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-29 15:20:38 +0100
commit8bd16328a9332c57b03198826e22b48fadcd21d9 (patch)
treef2fc1468e331d7acb39177fa423277e3e5c55b6c
parentf3f28ec7e6cad5003014462feeb9178496107e08 (diff)
downloadbitbake-1.36.zip
bitbake-1.36.tar.gz
bitbake-1.36.tar.bz2
checksum: sanity check path when recursively checksumming1.36
In case something goes tragically wrong, catch a request to checksum / and refuse. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/checksum.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/checksum.py b/lib/bb/checksum.py
index 8428920..4e1598f 100644
--- a/lib/bb/checksum.py
+++ b/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: