[OE-core] [PATCH 2/3] checksum: sanity check path when recursively checksumming
Ross Burton
ross.burton at intel.com
Mon Aug 13 17:20:53 UTC 2018
In case something goes tragically wrong, catch a request to checksum / and
refuse.
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
bitbake/lib/bb/checksum.py | 2 ++
1 file changed, 2 insertions(+)
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:
--
2.11.0
More information about the Openembedded-core
mailing list