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

git at git.openembedded.org git at git.openembedded.org
Tue Aug 14 15:36:34 UTC 2018


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

rpurdie pushed a commit to branch master
in repository bitbake.

commit e7cd4c86ef8a2c2bbf068e84c83fdc9e052b6e3d
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