From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 521B71FF0A7 for ; Wed, 16 Sep 2026 11:08:03 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id D6B9E215B9; Wed, 16 Sep 2026 11:07:51 +0200 (CEST) From: Jonas Theisen To: pve-devel@lists.proxmox.com Subject: [PATCH access-control 3/5] acl: Add new privilege VM.Reboot Date: Wed, 16 Sep 2026 11:06:57 +0200 Message-ID: <20260916090715.72307-4-j.theisen@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260916090715.72307-1-j.theisen@proxmox.com> References: <20260916090715.72307-1-j.theisen@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1789549658229 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.265 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: X3ESM775TUYB63ADSMRTTFQNTZTXXCQR X-Message-ID-Hash: X3ESM775TUYB63ADSMRTTFQNTZTXXCQR X-MailFrom: j.theisen@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add a new custom privilege to allow Users to Reboot and Reset VMs but not start or shut them down. Signed-off-by: Jonas Theisen --- src/PVE/AccessControl.pm | 1 + src/test/perm-test1.pl | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/PVE/AccessControl.pm b/src/PVE/AccessControl.pm index 0d632b3..b5f5115 100644 --- a/src/PVE/AccessControl.pm +++ b/src/PVE/AccessControl.pm @@ -1165,6 +1165,7 @@ my $privgroups = { my $valid_privs = { 'Permissions.Modify' => 1, # not contained in a group + 'VM.Reboot' => 1, # Custom permission only needed in special cases }; my $special_roles = { diff --git a/src/test/perm-test1.pl b/src/test/perm-test1.pl index d323447..713095e 100755 --- a/src/test/perm-test1.pl +++ b/src/test/perm-test1.pl @@ -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.Replicate,' - . 'VM.Snapshot,VM.Snapshot.Rollback', + . 'VM.GuestAgent.FileWrite,VM.GuestAgent.Unrestricted,VM.Migrate,VM.PowerMgmt,VM.Reboot,' + . 'VM.Replicate,VM.Snapshot,VM.Snapshot.Rollback', ); check_roles('max@pve', '/vms/200', 'storage_manager'); -- 2.47.3