public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH v3 access-control] fix #5335: stable sorting in user.cfg
@ 2024-04-16 11:27 Daniel Krambrock via pve-devel
  0 siblings, 0 replies; only message in thread
From: Daniel Krambrock via pve-devel @ 2024-04-16 11:27 UTC (permalink / raw)
  To: pve-devel; +Cc: Daniel Krambrock

[-- Attachment #1: Type: message/rfc822, Size: 4387 bytes --]

From: Daniel Krambrock <krambrock@hrz.uni-marburg.de>
To: pve-devel@lists.proxmox.com
Cc: Daniel Krambrock <krambrock@hrz.uni-marburg.de>
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>

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 <krambrock@hrz.uni-marburg.de>
---
 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



[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-17 12:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16 11:27 [pve-devel] [PATCH v3 access-control] fix #5335: stable sorting in user.cfg Daniel Krambrock via pve-devel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal