From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 69CA71FF37F for ; Wed, 17 Apr 2024 14:04:32 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E39FF4628; Wed, 17 Apr 2024 14:04:29 +0200 (CEST) To: pve-devel@lists.proxmox.com Date: Tue, 16 Apr 2024 13:27:25 +0200 X-Mailman-Approved-At: Wed, 17 Apr 2024 14:04:28 +0200 MIME-Version: 1.0 Message-ID: List-Id: Proxmox VE development discussion List-Post: From: Daniel Krambrock via pve-devel Precedence: list Cc: Daniel Krambrock X-Mailman-Version: 2.1.29 X-BeenThere: pve-devel@lists.proxmox.com List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Proxmox VE development discussion List-Help: Subject: [pve-devel] [PATCH v3 access-control] fix #5335: stable sorting in user.cfg Content-Type: multipart/mixed; boundary="===============0159267227473371164==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============0159267227473371164== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: pve-devel@lists.proxmox.com Delivered-To: pve-devel@lists.proxmox.com Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 8B8339698E for ; Tue, 16 Apr 2024 13:28:05 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6303618721 for ; Tue, 16 Apr 2024 13:27:35 +0200 (CEST) Received: from vhrz1173.hrz.uni-marburg.de (vhrz1173.hrz.uni-marburg.de [137.248.1.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Tue, 16 Apr 2024 13:27:34 +0200 (CEST) Received: from vhrz1173.hrz.uni-marburg.de (vhrz1173.HRZ.Uni-Marburg.DE [137.248.1.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by vhrz1865.HRZ.Uni-Marburg.DE (Postfix) with ESMTPS id 4VJhbT6ypXzyds; Tue, 16 Apr 2024 13:27:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uni-marburg.de; s=dkim; t=1713266854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references; bh=EPOREK/X1LjxJ+FOkDbtWIdXZSFlulPoT9OnDkzNO38=; b=FOhUPs1E01fOS5KI21owo7E50/K7jSLutSBTtdOwRr0WcjpKvTosRYH7W3yRr8t4q91nN1 ni1trLxLhM86FziBbdPlKWLFlACDpnf4JHtuqTWFGi9BsLpOVLtgu+a6YmPe1XWqblXuRr z0F7Nb2jyFOHgw+TlEAjHEG08gXPH6o= Authentication-Results: smtpd-out; dkim=none; spf=pass (smtpd-out: domain of krambrock@hrz.uni-marburg.de designates 137.248.1.43 as permitted sender) smtp.mailfrom=krambrock@hrz.uni-marburg.de Received: from laptop.HRZ.Uni-Marburg.DE (mvpn1831.VPN.Uni-Marburg.DE [137.248.108.31]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by vhrz1865.HRZ.Uni-Marburg.DE (Postfix) with ESMTPSA id 4VJhbT5Qm9zyb3; Tue, 16 Apr 2024 13:27:33 +0200 (CEST) From: Daniel Krambrock To: pve-devel@lists.proxmox.com Cc: Daniel Krambrock Subject: [PATCH v3 access-control] fix #5335: stable sorting in user.cfg Date: Tue, 16 Apr 2024 13:27:25 +0200 Message-Id: <20240416112725.19276-1-krambrock@hrz.uni-marburg.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Score: -0.36 / 12.00 / 15.00 X-Rspamd-Queue-Id: 4VJhbT6ypXzyds X-SPAM-LEVEL: Spam detection results: 0 BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DMARC_PASS -0.1 DMARC pass policy RCVD_IN_MSPIKE_H4 0.001 Very Good reputation (+4) RCVD_IN_MSPIKE_WL 0.001 Mailspike good senders SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record X-Mailman-Approved-At: Wed, 17 Apr 2024 14:04:28 +0200 Stable sorting in user.cfg config file allows tracking changes by checking into git or when using automation like ansible. Signed-off-by: Daniel Krambrock --- changes since v2: * code-style fix src/PVE/AccessControl.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/AccessControl.pm b/src/PVE/AccessControl.pm index 21f93ff..b1ef5dd 100644 --- a/src/PVE/AccessControl.pm +++ b/src/PVE/AccessControl.pm @@ -951,7 +951,7 @@ sub iterate_acl_tree { my $children = $node->{children}; - foreach my $child (keys %$children) { + for my $child (sort keys %$children) { iterate_acl_tree("$path/$child", $children->{$child}, $code); } } -- 2.39.2 --===============0159267227473371164== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel --===============0159267227473371164==--