summaryrefslogtreecommitdiffstats
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:23:58 +0100
commit61da85778ab84493b3b275df7a75637cdaef76eb (patch)
treebab5f8eed72d111d5addbe2dc660132cb70cfdfd
parent1b966ffd5fcfdc8e0fd1ed622b71016e732ee7e6 (diff)
downloadpoky-61da85778ab84493b3b275df7a75637cdaef76eb.tar.gz
bitbake: checksum: sanity check path when recursively checksumming
In case something goes tragically wrong, catch a request to checksum / and refuse. (Bitbake rev: 8bd16328a9332c57b03198826e22b48fadcd21d9) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/checksum.py2
1 files changed, 2 insertions, 0 deletions
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):
97 97
98 def checksum_dir(pth): 98 def checksum_dir(pth):
99 # Handle directories recursively 99 # Handle directories recursively
100 if pth == "/":
101 bb.fatal("Refusing to checksum /")
100 dirchecksums = [] 102 dirchecksums = []
101 for root, dirs, files in os.walk(pth): 103 for root, dirs, files in os.walk(pth):
102 for name in files: 104 for name in files: