all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob becef644ade4adef054b2189a3f4bac222c9608a 1408 bytes (raw)
name: gnu/packages/patches/guile-git-set-owner-validation.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 
From 88091a17f8276b03c95837b422adf5b0b7eda79e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Batista?= <nandre@riseup.net>
Date: Thu, 19 May 2022 09:47:36 -0300
Subject: [PATCH] settings: Add 'set-owner-validation!'.
To: guile-git@gitlab.com

* git/settings.scm: (set-owner-validation!): New procedure.
---
 git/settings.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/git/settings.scm b/git/settings.scm
index 4621f43..f6857d5 100644
--- a/git/settings.scm
+++ b/git/settings.scm
@@ -20,7 +20,8 @@
 (define-module (git settings)
   #:use-module (system foreign)
   #:use-module (git bindings)
-  #:export (set-tls-certificate-locations!
+  #:export (set-owner-validation!
+            set-tls-certificate-locations!
             set-user-agent!))
 
 ;; 'git_libgit2_opt_t' enum defined in <git2/common.h>.
@@ -62,6 +63,12 @@
 (define GIT_OPT_GET_OWNER_VALIDATION 35)
 (define GIT_OPT_SET_OWNER_VALIDATION 36)
 
+(define set-owner-validation!
+  (let ((proc (libgit2->procedure* "git_libgit2_opts" (list int int))))
+    (lambda (owner-validation)
+      "Boolean: enable/disable owner validation checks. See CVE 2022-24765."
+      (proc GIT_OPT_SET_OWNER_VALIDATION (if owner-validation 1 0)))))
+
 (define set-tls-certificate-locations!
   (let ((proc (libgit2->procedure* "git_libgit2_opts" (list int '* '*))))
     (lambda* (directory #:optional file)
-- 
2.36.0


debug log:

solving becef644ad ...
found becef644ad in https://yhetil.org/guix/20220828105827.26161-2-maximedevos@telenet.be/

applying [1/1] https://yhetil.org/guix/20220828105827.26161-2-maximedevos@telenet.be/
diff --git a/gnu/packages/patches/guile-git-set-owner-validation.patch b/gnu/packages/patches/guile-git-set-owner-validation.patch
new file mode 100644
index 0000000000..becef644ad

1:30: trailing whitespace.
 
1:35: trailing whitespace.
 
1:45: trailing whitespace.
-- 
Checking patch gnu/packages/patches/guile-git-set-owner-validation.patch...
1:47: new blank line at EOF.
+
Applied patch gnu/packages/patches/guile-git-set-owner-validation.patch cleanly.
warning: 4 lines add whitespace errors.

index at:
100644 becef644ade4adef054b2189a3f4bac222c9608a	gnu/packages/patches/guile-git-set-owner-validation.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.