diff mbox series

[v2] tests: bb.tests.fetch.GitShallowTest: allow file transport

Message ID 20221021093033.2949077-1-alexandre.belloni@bootlin.com
State New
Headers show
Series [v2] tests: bb.tests.fetch.GitShallowTest: allow file transport | expand

Commit Message

Alexandre Belloni Oct. 21, 2022, 9:30 a.m. UTC
From: Alexandre Belloni <alexandre.belloni@bootlin.com>

Following CVE-2022-39253, distributions are disabling file:// transport for
submodules. See https://git.launchpad.net/ubuntu/+source/git/tree/debian/patches/CVE-2022-39253-11.patch?h=applied/ubuntu/jammy-security

[YOCTO #14941]

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
---
 lib/bb/tests/fetch.py | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py
index c5f6ce9dabdb..d91bb595699e 100644
--- a/lib/bb/tests/fetch.py
+++ b/lib/bb/tests/fetch.py
@@ -1870,6 +1870,8 @@  class GitShallowTest(FetcherTest):
         self.add_empty_file('asub', cwd=smdir)
         self.add_empty_file('bsub', cwd=smdir)
 
+        self.d.appendVar('FETCHCMD_git', " -c protocol.file.allow=always")
+
         self.git('submodule init', cwd=self.srcdir)
         self.git('submodule add file://%s' % smdir, cwd=self.srcdir)
         self.git('submodule update', cwd=self.srcdir)
@@ -1900,6 +1902,8 @@  class GitShallowTest(FetcherTest):
         self.add_empty_file('asub', cwd=smdir)
         self.add_empty_file('bsub', cwd=smdir)
 
+        self.d.appendVar('FETCHCMD_git', " -c protocol.file.allow=always")
+
         self.git('submodule init', cwd=self.srcdir)
         self.git('submodule add file://%s' % smdir, cwd=self.srcdir)
         self.git('submodule update', cwd=self.srcdir)