[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:38 UTC 2018


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

rpurdie pushed a commit to branch 1.38
in repository bitbake.

commit 7444419b7fda34e14d653ba8470f5dfabb5da4f3
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