From 88091a17f8276b03c95837b422adf5b0b7eda79e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Batista?= 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 . @@ -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