From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id MC60H31KC2NwfAEAbAwnHQ (envelope-from ) for ; Sun, 28 Aug 2022 12:59:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id kPnOH31KC2O1MgAA9RJhRA (envelope-from ) for ; Sun, 28 Aug 2022 12:59:09 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D855B17820 for ; Sun, 28 Aug 2022 12:59:08 +0200 (CEST) Received: from localhost ([::1]:33562 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oSG0S-0000QU-3E for larch@yhetil.org; Sun, 28 Aug 2022 06:59:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oSG0M-0000QA-Kj for bug-guix@gnu.org; Sun, 28 Aug 2022 06:59:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oSG0M-0004vr-Bt for bug-guix@gnu.org; Sun, 28 Aug 2022 06:59:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oSG0M-0001EA-7c for bug-guix@gnu.org; Sun, 28 Aug 2022 06:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55399: [PATCH 2/2] gnu: guile-git: Add patches to support owner validation, and use libgit2@1.4.3. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 28 Aug 2022 10:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55399 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: 55399@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 55399-submit@debbugs.gnu.org id=B55399.16616843154678 (code B ref 55399); Sun, 28 Aug 2022 10:59:02 +0000 Received: (at 55399) by debbugs.gnu.org; 28 Aug 2022 10:58:35 +0000 Received: from localhost ([127.0.0.1]:57681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSFzu-0001DM-68 for submit@debbugs.gnu.org; Sun, 28 Aug 2022 06:58:35 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:53158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oSFzr-0001D8-Ru for 55399@debbugs.gnu.org; Sun, 28 Aug 2022 06:58:33 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:5dba:d409:33f7:a16]) by baptiste.telenet-ops.be with bizsmtp id CyyV2800920ykKC01yyWDz; Sun, 28 Aug 2022 12:58:30 +0200 From: Maxime Devos Date: Sun, 28 Aug 2022 12:58:27 +0200 Message-Id: <20220828105827.26161-2-maximedevos@telenet.be> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220828105827.26161-1-maximedevos@telenet.be> References: <20220828105827.26161-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1661684310; bh=yb5KY9eI13aJJQUMtwUpM+jPaOxtHUJR0zmiHjoKwrE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=aGSBt+XjFL2QiFIcjxWSmt/7ZnDhNj4rvEjEFRjzlNPRv3J317RqxWFO0BUsqHs99 y+SB/121dLKFjaSpkvd4qGluHzlr4UVhcMbL4W2J3cBLDIIBs5NSqLbYI5+XvoPTKE AKPZXBeNXSh9n9xzwll3nhvvupPFAY8Qm2WJtXXrbwg8aQb4GxBgoly3QwDc+OKfPb kTF9/51CELK1aD+i0Ht/qea5e7UWFvxb7KTsCNQmds6xTVQ8X7ralUa4Dddq6Ld+5Z 6/Il1k30YazxZ6ix9Dca20jwQgQ0GBsuC5d4pqZemGO8BG+S8EMO7A2odayTDDxnUM mrGV8gRW+yd2Q== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1661684349; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=yb5KY9eI13aJJQUMtwUpM+jPaOxtHUJR0zmiHjoKwrE=; b=V0jCrQKnvDPF7SnRrwurtXsUmxNikJpmCz6FVsWV9ICpuqJppGft+Ym5WkH+W5WzmuusMQ YcMLkTz4BVQxmGytIlUrOEwjrBfxIjRqWbVCtsyXixIE7A9VbHNZtrhcQXYUQXQmE89tSm QRdwuncBgiuFSFkYFiVv+A3a7PoAcvqfSBSmaJiUL+PWNz2pQG7w4QsLCHxw2tQpazKc6P en8SwwNWg5ivigHiJr5w2tPXURMg9NAycFUYaE4pylBiCyKvGWSwqtluBqDolw2Qv7PvI7 AiRGdXkkOwT3Cy7eKNa7JnYEax8ow5JtlRMC3Ti9nUfr6NEezpfXFrtjdsSeXQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661684349; a=rsa-sha256; cv=none; b=UJMO9Sui9QtH37I+/08SpvLl6FDYuwxatk/5cd1bfb4Y0A7/469po2tjKhTs+BzFdgEvGu kfcdCS7ojGQZ+xEvllzNyqK1rQnIJC+gqnjlVNawmKnmUGd7f9qNccJgpD/3M7peqdd300 ZKWLZSIgDyylNGCSuH/uMdKes8ZVZVU5uT/6txFgPGlzhUI6JGExOKMB3D2QZARxVAVsFT gMNHhRx0Unxns0kSxqoToiQNYwdv9sZIjCAn/ib34nRo1q0k0+tLpkecRE8PDcCD2gixVz Ll7dqU0ulYjWiRfsSoAKe5g93SHI2USwq0tuxaa0kBr+FROdo0/D/Kjn0KHkMw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=aGSBt+Xj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 8.61 X-Spam: Yes Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=aGSBt+Xj; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D855B17820 X-Spam-Score: 8.61 X-Migadu-Spam: Yes X-Migadu-Scanner: scn1.migadu.com X-TUID: VBXwmxQ4KfCY These two changes have to be done at the same time -- if the libgit2 dependency is updated first, then we would have a commit during which "guix pull" is broken when using local channels (see: ). And if the patches are added first, then the build of guile-git breaks because the tests assume a new libgit2. Together with the previous commit, this fixes . Tested with (first step): $ ./pre-inst-env guix pull --url=$PWD --commit=b22ddb51d8dfa4ab7f683c99ffc1fa6f44e0dc6b --profile=../guix-with-libgit2 --disable-authentication --channels=../channels.scm where b22ddb51d8dfa4ab7f683c99ffc1fa6f44e0dc6b is the commit after applying these two patches. Make sure to only put the Guix channel in ../channels.scm, because of --disable-authentication. This builds a Guix that uses the new libgit2 and patched guile-git. Then, it is tested that pulling still works from a local checkout: $ ../guix-with-libgit2/bin/guix pull --url=$PWD --commit=c3d9ddbf3d34b58261ab9e03c794f5fbad34142d --channels=../channels.scm --disable-authentication -p../another-guix where c3d9ddbf3d34b58261ab9e03c794f5fbad34142d is a commit that hasn't been seen before by the "guix pull" machinery. * gnu/packages/patches/guile-git-fix-git-opt.patch: New patch. * gnu/packages/patches/guile-git-set-owner-validation.patch: New patch. * gnu/packages/patches/guile-git-test-owner-validation.patch: New patch. * gnu/packages/guile.scm (guile-git)[source]{patches}: Add new patches. * gnu/local.mk (dist_patch_DATA): Register new patches. --- gnu/local.mk | 3 + gnu/packages/guile.scm | 15 +- .../patches/guile-git-fix-git-opt.patch | 57 +++++++ .../guile-git-set-owner-validation.patch | 41 +++++ .../guile-git-test-owner-validation.patch | 153 ++++++++++++++++++ 5 files changed, 264 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/guile-git-fix-git-opt.patch create mode 100644 gnu/packages/patches/guile-git-set-owner-validation.patch create mode 100644 gnu/packages/patches/guile-git-test-owner-validation.patch diff --git a/gnu/local.mk b/gnu/local.mk index 412d512775..081f240157 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1244,6 +1244,9 @@ dist_patch_DATA = \ %D%/packages/patches/guile-fibers-wait-for-io-readiness.patch \ %D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \ %D%/packages/patches/guile-git-adjust-for-libgit2-1.2.0.patch \ + %D%/packages/patches/guile-git-fix-git-opt.patch \ + %D%/packages/patches/guile-git-set-owner-validation.patch \ + %D%/packages/patches/guile-git-test-owner-validation.patch \ %D%/packages/patches/guile-present-coding.patch \ %D%/packages/patches/guile-rsvg-pkgconfig.patch \ %D%/packages/patches/guile-emacs-fix-configure.patch \ diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index d320763a61..87b35e2db2 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -16,7 +16,7 @@ ;;; Copyright © 2018 Eric Bavier ;;; Copyright © 2019 Taylan Kammer ;;; Copyright © 2020, 2021, 2022 Efraim Flashner -;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021, 2022 Maxime Devos ;;; Copyright © 2021 Timothy Sample ;;; ;;; This file is part of GNU Guix. @@ -817,7 +817,14 @@ (define-public guile-git (base32 "11a51acibwi2hpaygmrpn6nwbr4lqalc87ihrgj3mhz6swbsk9n7")) (patches (search-patches - "guile-git-adjust-for-libgit2-1.2.0.patch")))) + "guile-git-adjust-for-libgit2-1.2.0.patch" + ;; These three patches from + ;; + ;; together add procedures to disable/enable owner validation, + ;; which is required for fixing . + "guile-git-fix-git-opt.patch" + "guile-git-set-owner-validation.patch" + "guile-git-test-owner-validation.patch")))) (build-system gnu-build-system) (arguments `(#:make-flags '("GUILE_AUTO_COMPILE=0") ; to prevent guild warnings @@ -833,9 +840,7 @@ (define-public guile-git (native-inputs (list pkg-config autoconf automake texinfo guile-3.0 guile-bytestructures)) (inputs - ;; libgit2@1.4.3 ‘fixed’ a git CVE it never shared, breaking Guix. Use - ;; 1.3 for now; see for alternatives. - (list guile-3.0 libgit2-1.3)) + (list guile-3.0 libgit2)) (propagated-inputs (list guile-bytestructures)) (synopsis "Guile bindings for libgit2") diff --git a/gnu/packages/patches/guile-git-fix-git-opt.patch b/gnu/packages/patches/guile-git-fix-git-opt.patch new file mode 100644 index 0000000000..050c72818a --- /dev/null +++ b/gnu/packages/patches/guile-git-fix-git-opt.patch @@ -0,0 +1,57 @@ +From 99054837c6616e06c48c944094114ae8c9b628f3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Batista?= +Date: Thu, 19 May 2022 09:35:25 -0300 +To: incoming+guile-git-guile-git-1792500-1ffl9ys3eg9dz7xscimedvf7n-merge-request@incoming.gitlab.com +Subject: Update GIT_OPT definitions to match upstream enum + +* git/settings.scm: Update definitions to match libgit2 v. 1.4.3. + +--- + git/settings.scm | 25 +++++++++++++++++++++++-- + 1 file changed, 23 insertions(+), 2 deletions(-) + +diff --git a/git/settings.scm b/git/settings.scm +index 83e2483..4621f43 100644 +--- a/git/settings.scm ++++ b/git/settings.scm +@@ -1,5 +1,6 @@ + ;;; Guile-Git --- GNU Guile bindings of libgit2 + ;;; Copyright © 2017 Ludovic Courtès ++;;; Copyright © 2022 André Batista + ;;; + ;;; This file is part of Guile-Git. + ;;; +@@ -38,8 +39,28 @@ + (define GIT_OPT_SET_SSL_CERT_LOCATIONS 12) + (define GIT_OPT_SET_USER_AGENT 13) + (define GIT_OPT_ENABLE_STRICT_OBJECT_CREATION 14) +-(define GIT_OPT_SET_SSL_CIPHERS 15) +-(define GIT_OPT_GET_USER_AGENT 16) ++(define GIT_OPT_ENABLE_STRICT_SYMBOLIC_REF_CREATION 15) ++(define GIT_OPT_SET_SSL_CIPHERS 16) ++(define GIT_OPT_GET_USER_AGENT 17) ++(define GIT_OPT_ENABLE_OFS_DELTA 18) ++(define GIT_OPT_ENABLE_FSYNC_GITDIR 19) ++(define GIT_OPT_GET_WINDOWS_SHAREMODE 20) ++(define GIT_OPT_SET_WINDOWS_SHAREMODE 21) ++(define GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION 22) ++(define GIT_OPT_SET_ALLOCATOR 23) ++(define GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY 24) ++(define GIT_OPT_GET_PACK_MAX_OBJECTS 25) ++(define GIT_OPT_SET_PACK_MAX_OBJECTS 26) ++(define GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS 27) ++(define GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE 28) ++(define GIT_OPT_GET_MWINDOW_FILE_LIMIT 29) ++(define GIT_OPT_SET_MWINDOW_FILE_LIMIT 30) ++(define GIT_OPT_SET_ODB_PACKED_PRIORITY 31) ++(define GIT_OPT_SET_ODB_LOOSE_PRIORITY 32) ++(define GIT_OPT_GET_EXTENSIONS 33) ++(define GIT_OPT_SET_EXTENSIONS 34) ++(define GIT_OPT_GET_OWNER_VALIDATION 35) ++(define GIT_OPT_SET_OWNER_VALIDATION 36) + + (define set-tls-certificate-locations! + (let ((proc (libgit2->procedure* "git_libgit2_opts" (list int '* '*)))) +-- +2.36.0 + 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 --- /dev/null +++ b/gnu/packages/patches/guile-git-set-owner-validation.patch @@ -0,0 +1,41 @@ +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 + diff --git a/gnu/packages/patches/guile-git-test-owner-validation.patch b/gnu/packages/patches/guile-git-test-owner-validation.patch new file mode 100644 index 0000000000..3ef2fa3557 --- /dev/null +++ b/gnu/packages/patches/guile-git-test-owner-validation.patch @@ -0,0 +1,153 @@ +From 4a2a6d3723afc05b93edfe430c7f95abbe6db021 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Batista?= +Date: Tue, 14 Jun 2022 23:00:07 -0300 +Subject: [PATCH] settings: Add 'owner-validation?'. +To: guile-git@gitlab.com + +* git/settings.scm: (owner-validation?): New procedure. +* tests/settings.scm: Add owner-validation? tests. +--- + Makefile.am | 1 + + git/settings.scm | 13 ++++++++++++- + git/types.scm | 11 +++++++++++ + tests/settings.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 69 insertions(+), 1 deletion(-) + create mode 100644 tests/settings.scm + +diff --git a/Makefile.am b/Makefile.am +index 0f92d4c..033033d 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -95,6 +95,7 @@ TESTS = \ + tests/remote.scm \ + tests/rev-parse.scm \ + tests/status.scm \ ++ tests/settings.scm \ + tests/submodule.scm \ + tests/tag.scm \ + tests/tree.scm +diff --git a/git/settings.scm b/git/settings.scm +index 5022945..582f519 100644 +--- a/git/settings.scm ++++ b/git/settings.scm +@@ -1,6 +1,7 @@ + ;;; Guile-Git --- GNU Guile bindings of libgit2 + ;;; Copyright © 2017 Ludovic Courtès + ;;; Copyright © 2022 André Batista ++;;; Copyright © 2022 Maxime Devos + ;;; + ;;; This file is part of Guile-Git. + ;;; +@@ -20,7 +21,9 @@ + (define-module (git settings) + #:use-module (system foreign) + #:use-module (git bindings) +- #:export (set-owner-validation! ++ #:use-module (git types) ++ #:export (owner-validation? ++ set-owner-validation! + set-tls-certificate-locations! + set-user-agent!)) + +@@ -63,6 +66,14 @@ + (define GIT_OPT_GET_OWNER_VALIDATION 35) + (define GIT_OPT_SET_OWNER_VALIDATION 36) + ++(define owner-validation? ++ (let ((proc (libgit2->procedure* "git_libgit2_opts" (list int '*)))) ++ (lambda () ++ "Boolean: Return owner validation setting." ++ (let ((out (make-int-pointer))) ++ (proc GIT_OPT_GET_OWNER_VALIDATION out) ++ (if (equal? (pointer->int out) 0) #f #t))))) ++ + (define set-owner-validation! + (let ((proc (libgit2->procedure* "git_libgit2_opts" (list int int)))) + (lambda (owner-validation) +diff --git a/git/types.scm b/git/types.scm +index 3503ccf..7609a8a 100644 +--- a/git/types.scm ++++ b/git/types.scm +@@ -46,7 +46,9 @@ + tree? pointer->tree tree->pointer + tree-entry? pointer->tree-entry tree-entry->pointer + submodule? pointer->submodule submodule->pointer ++ pointer->int + pointer->size_t ++ make-int-pointer + make-size_t-pointer + make-double-pointer)) + +@@ -102,9 +104,18 @@ + (define (make-double-pointer) + (bytevector->pointer (make-bytevector (sizeof '*)))) + ++(define (make-int-pointer) ++ (bytevector->pointer (make-bytevector (sizeof int)))) ++ + (define (make-size_t-pointer) + (bytevector->pointer (make-bytevector (sizeof size_t)))) + ++(define (pointer->int ptr) ++ (bytevector-sint-ref (pointer->bytevector ptr (sizeof int)) ++ 0 ++ (native-endianness) ++ (sizeof int))) ++ + (define (pointer->size_t ptr) + (bytevector-uint-ref (pointer->bytevector ptr (sizeof size_t)) + 0 +diff --git a/tests/settings.scm b/tests/settings.scm +new file mode 100644 +index 0000000..a82c5ca +--- /dev/null ++++ b/tests/settings.scm +@@ -0,0 +1,45 @@ ++;;; Guile-Git --- GNU Guile bindings of libgit2 ++;;; Copyright © 2022 André Batista ++;;; ++;;; This file is part of Guile-Git. ++;;; ++;;; Guile-Git is free software; you can redistribute it and/or modify it ++;;; under the terms of the GNU General Public License as published by ++;;; the Free Software Foundation; either version 3 of the License, or ++;;; (at your option) any later version. ++;;; ++;;; Guile-Git is distributed in the hope that it will be useful, but ++;;; WITHOUT ANY WARRANTY; without even the implied warranty of ++;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++;;; General Public License for more details. ++;;; ++;;; You should have received a copy of the GNU General Public License ++;;; along with Guile-Git. If not, see . ++ ++(define-module (tests settings) ++ #:use-module (srfi srfi-64)) ++ ++(use-modules (tests helpers)) ++(use-modules (git)) ++ ++(test-begin "settings") ++ ++(libgit2-init!) ++ ++(with-repository "simple" directory ++ ++ (test-equal "disable owner validation" ++ #f ++ ((lambda () ++ (set-owner-validation! #f) ++ (owner-validation?)))) ++ ++ (test-equal "enable owner validation" ++ #t ++ ((lambda () ++ (set-owner-validation! #t) ++ (owner-validation?))))) ++ ++(libgit2-shutdown!) ++ ++(test-end) +-- +2.36.0 + -- 2.37.1