mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
5581b374b9
commit
63a4ff7cf5
@@ -97,6 +97,8 @@ class FileChecksumCache(MultiProcessCache):
|
|||||||
|
|
||||||
def checksum_dir(pth):
|
def checksum_dir(pth):
|
||||||
# Handle directories recursively
|
# Handle directories recursively
|
||||||
|
if pth == "/":
|
||||||
|
bb.fatal("Refusing to checksum /")
|
||||||
dirchecksums = []
|
dirchecksums = []
|
||||||
for root, dirs, files in os.walk(pth):
|
for root, dirs, files in os.walk(pth):
|
||||||
for name in files:
|
for name in files:
|
||||||
|
|||||||
Reference in New Issue
Block a user