[oe-commits] [bitbake] 02/02: checksum: sanity check path when recursively checksumming

git at git.openembedded.org git at git.openembedded.org
Wed Aug 29 14:24:35 UTC 2018


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch 1.36
in repository bitbake.

commit 8bd16328a9332c57b03198826e22b48fadcd21d9
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Mon Aug 13 19:02:26 2018 +0100

    checksum: sanity check path when recursively checksumming
    
    In case something goes tragically wrong, catch a request to checksum / and
    refuse.
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/checksum.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/bb/checksum.py b/lib/bb/checksum.py
index 8428920..4e1598f 100644
--- a/lib/bb/checksum.py
+++ b/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:

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list