diff options
author | Ross Burton <ross.burton@intel.com> | 2018-08-13 19:02:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-08-29 15:23:51 +0100 |
commit | 45ef387cc54a0584807e05a952e1e4681ec4c664 (patch) | |
tree | 4ddca4de9334ad3f7dccdd2d5304fec73f945697 /bitbake | |
parent | ee176ddba8739301bea6ca990783773b2e3fbdcb (diff) | |
download | poky-45ef387cc54a0584807e05a952e1e4681ec4c664.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: 7444419b7fda34e14d653ba8470f5dfabb5da4f3)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/checksum.py | 2 |
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: |