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 A6A7B1FF17A for ; Fri, 18 Jul 2025 11:29:57 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EC1B918671; Fri, 18 Jul 2025 11:30:36 +0200 (CEST) From: Fiona Ebner To: pve-devel@lists.proxmox.com Date: Fri, 18 Jul 2025 11:30:07 +0200 Message-ID: <20250718093024.55570-2-f.ebner@proxmox.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250718093024.55570-1-f.ebner@proxmox.com> References: <20250718093024.55570-1-f.ebner@proxmox.com> MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1752831026025 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.028 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH access-control 1/9] add VM.Replicate privilege X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Currently, guest replication is guarded with Datastore.Allocate on '/storage', which is rather surprising. One could require Datastore.AllocateSpace on all involved storages, but having a dedicated privilege like for other VM operations like migration and snapshot seems to be more natural. Signed-off-by: Fiona Ebner --- src/PVE/AccessControl.pm | 1 + src/test/perm-test1.pl | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/PVE/AccessControl.pm b/src/PVE/AccessControl.pm index e48e647..6c5a13f 100644 --- a/src/PVE/AccessControl.pm +++ b/src/PVE/AccessControl.pm @@ -1061,6 +1061,7 @@ my $privgroups = { 'VM.Clone', 'VM.GuestAgent.Unrestricted', 'VM.Migrate', + 'VM.Replicate', 'VM.Snapshot', 'VM.Snapshot.Rollback', ], diff --git a/src/test/perm-test1.pl b/src/test/perm-test1.pl index 50b46e2..d323447 100755 --- a/src/test/perm-test1.pl +++ b/src/test/perm-test1.pl @@ -66,8 +66,8 @@ check_permission( . 'VM.Allocate,VM.Audit,VM.Backup,VM.Clone,VM.Config.CDROM,VM.Config.CPU,VM.Config.Cloudinit,' . 'VM.Config.Disk,VM.Config.HWType,VM.Config.Memory,VM.Config.Network,VM.Config.Options,' . 'VM.Console,VM.GuestAgent.Audit,VM.GuestAgent.FileRead,VM.GuestAgent.FileSystemMgmt,' - . 'VM.GuestAgent.FileWrite,VM.GuestAgent.Unrestricted,VM.Migrate,VM.PowerMgmt,VM.Snapshot,' - . 'VM.Snapshot.Rollback', + . 'VM.GuestAgent.FileWrite,VM.GuestAgent.Unrestricted,VM.Migrate,VM.PowerMgmt,VM.Replicate,' + . 'VM.Snapshot,VM.Snapshot.Rollback', ); # Administrator -> Permissions.Modify! check_permission( @@ -86,8 +86,8 @@ check_permission( . 'VM.Allocate,VM.Audit,VM.Backup,VM.Clone,VM.Config.CDROM,VM.Config.CPU,VM.Config.Cloudinit,' . 'VM.Config.Disk,VM.Config.HWType,VM.Config.Memory,VM.Config.Network,VM.Config.Options,' . 'VM.Console,VM.GuestAgent.Audit,VM.GuestAgent.FileRead,VM.GuestAgent.FileSystemMgmt,' - . 'VM.GuestAgent.FileWrite,VM.GuestAgent.Unrestricted,VM.Migrate,VM.PowerMgmt,VM.Snapshot,' - . 'VM.Snapshot.Rollback', + . 'VM.GuestAgent.FileWrite,VM.GuestAgent.Unrestricted,VM.Migrate,VM.PowerMgmt,VM.Replicate,' + . 'VM.Snapshot,VM.Snapshot.Rollback', ); check_roles('max@pve', '/vms/200', 'storage_manager'); -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel