bdev: Add functions to verify file storage paths
- LoadAllowedFileStoragePaths: Loads a list of allowed file storage paths from a file - CheckFileStoragePath: Checks a path against the list of allowed paths The unit test for “utils.IsBelowDir” is updated with cases which weren't tested before. Signed-off-by:Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
Showing
- lib/bdev.py 54 additions, 0 deletionslib/bdev.py
- lib/errors.py 6 additions, 0 deletionslib/errors.py
- lib/pathutils.py 1 addition, 0 deletionslib/pathutils.py
- test/ganeti.bdev_unittest.py 50 additions, 1 deletiontest/ganeti.bdev_unittest.py
- test/ganeti.utils.io_unittest.py 6 additions, 0 deletionstest/ganeti.utils.io_unittest.py
Loading
Please register or sign in to comment