This is an automated email from the ASF dual-hosted git repository.

stevel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new d7fd61d6163 HADOOP-18202. create-release fails fatal: unsafe 
repository (#4188)
d7fd61d6163 is described below

commit d7fd61d6163950a196a2bd66e1c3d03c9cff1009
Author: Steve Loughran <[email protected]>
AuthorDate: Mon Apr 18 19:24:35 2022 +0100

    HADOOP-18202. create-release fails fatal: unsafe repository (#4188)
    
    
    Since April 2022/CVE-2022-24765, git refuses to work in directories
    whose owner != the current user, unless explicitly told to trust it.
    
    This patches the create-release script to trust the /build/source
    dir mounted from the hosting OS, whose userid is inevitably different
    from that of the account in the container running git.
    
    Contributed by: Steve Loughran, Ayush Saxena and the new git error messages
---
 dev-support/bin/create-release | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dev-support/bin/create-release b/dev-support/bin/create-release
index 31ae6ee1b06..0ba55e7e957 100755
--- a/dev-support/bin/create-release
+++ b/dev-support/bin/create-release
@@ -535,6 +535,10 @@ function makearelease
 
   big_console_header "Cleaning the Source Tree"
 
+  # Since CVE-2022-24765 in April 2022, git refuses to work in directories
+  # whose owner != the current user, unless explicitly told to trust it.
+  git config --global --add safe.directory /build/source
+
   # git clean to clear any remnants from previous build
   run "${GIT}" clean -xdf -e /patchprocess
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to