From patchwork Wed Mar 19 16:24:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Volf <~@wolfsden.cz> X-Patchwork-Id: 40436 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CB60227BBEA; Wed, 19 Mar 2025 16:26:46 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6E53927BBE2 for ; Wed, 19 Mar 2025 16:26:46 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tuwFS-0005V1-7t; Wed, 19 Mar 2025 12:26:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tuwF7-0004rm-P8 for guix-patches@gnu.org; Wed, 19 Mar 2025 12:26:13 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tuwF7-0000Ml-CL for guix-patches@gnu.org; Wed, 19 Mar 2025 12:26:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=169A5Vxt19NYqhf409mf3D1nkYCH/LakMK8eeVaTnU0=; b=FhhFcZFqxgDPrhphC44pptSwptvPG/Nrv6wV5Y8EpbMwP4YXgkyNEFijETnd2QTwq2eIb3i4qNsXYWFu50WlaQewJP7/OMF27vJf2MrPjYxNFwdDSve70FsDXDIhHvcO+IB8hhBjXTmyFgkMNGK9LoX4I5q0Q7RsrVD7PpIjAfyR/h1LhGM8EMNA2uyPIgskcDq5rrghdXU/z3pnsoEhNBHQgl1ZOeR/ziEZOiTJS+Z9FP9SWaRXNCwlxFKtbmjuHlH9ea28ko4SB0Jp3NHjjIxu/Nf8N61ZIvEsWVfy3UtnvyboZy6IpTtt2OTUMmgA7k0fSoMbUWBefROgEOpj2w==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tuwF7-0007MX-5l for guix-patches@gnu.org; Wed, 19 Mar 2025 12:26:09 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77001] [PATCH v2 7/8] services: kerberos: Fix order of definitions. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 19 Mar 2025 16:26:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77001 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77001@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz> Received: via spool by 77001-submit@debbugs.gnu.org id=B77001.174240154128038 (code B ref 77001); Wed, 19 Mar 2025 16:26:09 +0000 Received: (at 77001) by debbugs.gnu.org; 19 Mar 2025 16:25:41 +0000 Received: from localhost ([127.0.0.1]:52707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tuwEe-0007Hr-Dz for submit@debbugs.gnu.org; Wed, 19 Mar 2025 12:25:41 -0400 Received: from wolfsden.cz ([37.205.8.62]:48826) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tuwE2-00076O-Va for 77001@debbugs.gnu.org; Wed, 19 Mar 2025 12:25:10 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 00321299892; Wed, 19 Mar 2025 16:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742401500; bh=DFfDqs1er3Xivg5lqdjy7KsvstcGp413/HJ7AOR+hoc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Fan+tOilvgk+fFCcJ8ntMHk8fI0ni36QwCf0AbfFLlGOGL1Z7ccbQnVdB3ItojYFB Q1dIrFHgpK1v8D8DF9D4cYC0fonD5HUr2to1oDmuOZCLZRwvemtgVo68SdLkYUhah/ xJtUBryDCu2d3Wb907qXywGlNLnLdqPEPFC4/Hqc/O/Ha8kY5IM4BwIltYj/X+xdcJ FNTkvjZVKztWxCpvnYaRauLPi2CX13U3I/KCZi6lrGe8Qp+yaxCaWqLwqZLKZy9o+p A1YiuC0woNUuNVLIhnuUKz9LwgXuv3X13y9h7IMSg1i7BWoJcq/J8BLd9yiTm/jC2o nWNZdEB3LUwNONuyanANdHdZtvpUtf170D2fjjZQwHsUCPBy+6l2uWDVA12cBBdetK odLuLuQd7eFot0bcWhEB86kFhDbrOwBkfZYzGTwUIZyBJciSKrryVnL89nrKVrJLaC LurK/KuIxpnrwL+s0Sz1Bzu7s8apgv0asrN/35wHcTWPwO/JmrBiKhXGYniDW71L0E eLsclkzT8y8Lu0V4QPVIi+eHBr8iNuLIE9pA99VKEe5KRmzmV4wnJTT3vh4CqaAe56 ker/IesQKvy5NWElUT0/V0Hifuxx4+iGyeJ2XyZCxlzRgGDoEzm//EecyBiw4NGTx3 g5I51VDu2/oOviwE56Pzr84Y= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 52E1529876B; Wed, 19 Mar 2025 16:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742401499; bh=DFfDqs1er3Xivg5lqdjy7KsvstcGp413/HJ7AOR+hoc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=IFvRmjOgNfLsTDy+lI1z2B75ZGZVxk/rLrTlQdkm7RO6Fqa0huTYXnpQek0wCNZu4 VL6NWtXOWTqucqDrh/kjEYp5dSbwPUe3ASzI7N5x0Exuym8+uBmu02YuTLVtDa8i0p Iq3XuPfTHzLyxAYd9A/VNBB844PWL9YxobfG8Y2vQvQ23S3cKce4Xv3yYSjdV+2uIX PIU+x193xuZ0gUCPxphwqvEuxwLLEZvaoxdwFBpfD5TWn7ed+LuL1v3Hs+xXEhVtlA LzH6XO4MRLrpWncGwnpjm2RSQDYcBShw8eGiBkuJp7Y90x640KMSATDKiGVQpsEhUJ Z9MGPCqCj5Nuo9c0V45GqTSr3cNCqG6esadiEu7FKlY+qduYx2jDWIFlXYrvqYZBWc 8UU2RsI2jIhAVssY3R34s09CgAe/W5yE7lNb74aJ1V/dXNY6PbRvi1UyDQJAH6ooEm XsRzEfoRdofvySp3uyyuTXEB3KxLyr1PD/DcCpszFnkZ1eE+s03LWP2c/pxYGfMsiv 7WDSOC5ZW/jn3odhbEtE40K/clV6eNUl1eqQWMF6g4ux3WJRWgpcis1NSRMKYwwj3B L9frXoE6UkQDYqO30inBzst0tVFdd6yIRtgeBWAJbU7avs5RGdgH+0E4jYuql1iWyQ G9CRuKnH6i+Lv9+IxLB3pMTg= From: Tomas Volf <~@wolfsden.cz> Date: Wed, 19 Mar 2025 17:24:33 +0100 Message-ID: <0933aa1105d60f052915f78a2b5ae5e50966de41.1742401473.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <43cc10a6e9e4f8359465adcd73ba59e9404012ba.1742401473.git.~@wolfsden.cz> References: <43cc10a6e9e4f8359465adcd73ba59e9404012ba.1742401473.git.~@wolfsden.cz> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches Generating the configuration file would error out with error stating: Wrong type to apply: # Moving the procedures below the respective define-configuration fixes that. * gnu/services/kerberos.scm (realm-list?, serialize-realm-list): Move below define-configuration for krb5-realm. Change-Id: I6a520a92cdc3c42d3916cdf33d427dadc531e7d1 --- gnu/services/kerberos.scm | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/gnu/services/kerberos.scm b/gnu/services/kerberos.scm index de85b43223..fcb0ac1ab4 100644 --- a/gnu/services/kerberos.scm +++ b/gnu/services/kerberos.scm @@ -170,23 +170,6 @@ (define (serialize-free-form-fields field-name val) (define non-negative-integer/unset? (predicate/unset non-negative-integer?)) -(define (realm-list? val) - (and (list? val) - (and-map (lambda (x) (krb5-realm? x)) val))) - -(define (serialize-realm-list field-name val) - (format #t "\n[~a]\n" field-name) - (for-each (lambda (realm) - (format #t "\n~a = {\n" (krb5-realm-name realm)) - (for-each (lambda (field) - (unless (eq? 'name (configuration-field-name field)) - ((configuration-field-serializer field) - (configuration-field-name field) - ((configuration-field-getter field) - realm)))) krb5-realm-fields) - - (format #t "}\n")) val)) - ;; For a more detailed explanation of these fields see man 5 krb5.conf @@ -246,6 +229,23 @@ (define-configuration krb5-realm "Used when the V4 realm name and the V5 realm name are not the same, but still share the same principal names and passwords.")) +(define (realm-list? val) + (and (list? val) + (and-map (lambda (x) (krb5-realm? x)) val))) + +(define (serialize-realm-list field-name val) + (format #t "\n[~a]\n" field-name) + (for-each (lambda (realm) + (format #t "\n~a = {\n" (krb5-realm-name realm)) + (for-each (lambda (field) + (unless (eq? 'name (configuration-field-name field)) + ((configuration-field-serializer field) + (configuration-field-name field) + ((configuration-field-getter field) + realm)))) krb5-realm-fields) + + (format #t "}\n")) val)) + ;; For a more detailed explanation of these fields see man 5 krb5.conf