summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/checksum.py
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-14 16:32:48 +0100
commit63a4ff7cf5f7d1671ab85800bc2212dd9cd9748d (patch)
tree7911b270a00ea38a60defbf83fd0c63ea9e3d362 /bitbake/lib/bb/checksum.py
parent5581b374b94c2f392a72f0affccb14bcac27d51a (diff)
downloadpoky-63a4ff7cf5f7d1671ab85800bc2212dd9cd9748d.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: e7cd4c86ef8a2c2bbf068e84c83fdc9e052b6e3d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/checksum.py')
-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: