Skip to contentSkip to conversation

ci: declare git repository a safe directory

PATCH In review Christian Göttsche 2 participants 3 messages May 17, 2022 – May 18, 2022 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ci: declare git repository a safe directory

Since version 2.35.2, due to CVE-2022-24765, git refuses to operate by default on a repository owned by a different user.

---
test run: https://github.com/cgzones/selinux/actions/runs/2337320823

---
 scripts/ci/fedora-test-runner.sh | 1 +
 1 file changed, 1 insertion(+)
scripts/ci/fedora-test-runner.sh +1 -0
index 3ce2c3a6..7676f6ea 100755
@@ -70,6 +70,7 @@ dnf install -y \
 cd "$SELINUX_DIR"
 
 # Show HEAD commit for sanity checking
+git config --global --add safe.directory "$SELINUX_DIR"
 git log --oneline -1
 
 #
Signature · 1 line
2.36.1
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Christian Göttsche

Since version 2.35.2, due to CVE-2022-24765, git refuses to operate by default on a repository owned by a different user.

Quoted 20 lines

---
test run: https://github.com/cgzones/selinux/actions/runs/2337320823

---
 scripts/ci/fedora-test-runner.sh | 1 +
 1 file changed, 1 insertion(+)
scripts/ci/fedora-test-runner.sh +1 -0
index 3ce2c3a6..7676f6ea 100755
@@ -70,6 +70,7 @@ dnf install -y \
 cd "$SELINUX_DIR"
 
 # Show HEAD commit for sanity checking
+git config --global --add safe.directory "$SELINUX_DIR"
 git log --oneline -1
 
 #
Signature · 1 line
2.36.1
#2 lore raw
Quoted 8 lines · Petr Lautrbach
Quoted 4 lines · Christian Göttsche

Since version 2.35.2, due to CVE-2022-24765, git refuses to operate by default on a repository owned by a different user.

Merged.

Quoted 20 lines
Quoted 20 lines

---
test run: https://github.com/cgzones/selinux/actions/runs/2337320823

---
 scripts/ci/fedora-test-runner.sh | 1 +
 1 file changed, 1 insertion(+)
scripts/ci/fedora-test-runner.sh +1 -0
index 3ce2c3a6..7676f6ea 100755
@@ -70,6 +70,7 @@ dnf install -y \
 cd "$SELINUX_DIR"
 
 # Show HEAD commit for sanity checking
+git config --global --add safe.directory "$SELINUX_DIR"
 git log --oneline -1
 
 #
Signature · 1 line
2.36.1