From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 7276477024 for ; Thu, 21 Oct 2021 11:06:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 6103D1B2E7 for ; Thu, 21 Oct 2021 11:05:32 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (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 firstgate.proxmox.com (Proxmox) with ESMTPS id 95EB11B2DA for ; Thu, 21 Oct 2021 11:05:31 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 6A16F45EC8; Thu, 21 Oct 2021 11:05:31 +0200 (CEST) Message-ID: Date: Thu, 21 Oct 2021 11:05:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Thunderbird/94.0 Content-Language: en-US To: Proxmox VE development discussion , =?UTF-8?Q?Phillipp_R=c3=b6ll?= References: <20211021084650.26753-1-pr@lima-city.de> From: Thomas Lamprecht In-Reply-To: <20211021084650.26753-1-pr@lima-city.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 1.328 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment NICE_REPLY_A -2.267 Looks like a legit reply (A) SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH] Check only first part of script parameter for executability 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: , X-List-Received-Date: Thu, 21 Oct 2021 09:06:02 -0000 Hi, thanks for your effort in contributing to Proxmox VE! A few things inline On 21.10.21 10:46, Phillipp R=C3=B6ll wrote: > When giving a script parameter including arguments to the dump process,= > the full script parameter including the arguments is checked for > executablility. The following will always abort with a "not executable"= > error: >=20 > vzdump 100 --script "/usr/local/bin/myscript.pl myarg" >=20 > If we split the script argument and check only the first part, the > check works as expected. your sign-off is missing here and it doesn't seems like we have a signed CLA from you or your company here, and to be able to take in a patch you'= d need to send one to . For details please check: https://pve.proxmox.com/wiki/Developer_Documentation#Software_License_and= _Copyright > --- > PVE/VZDump.pm | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm > index 88ac11b3..fe1a7f23 100644 > --- a/PVE/VZDump.pm > +++ b/PVE/VZDump.pm > @@ -630,7 +630,9 @@ sub run_hook_script { > my $script =3D $opts->{script}; > return if !$script; > =20 > - if (!-x $script) { > + my @script_args =3D split /\s+/, $script; That would break existing configuration that use a script with whitespace= in its path name. Can you please provide your usecase where the arguments Proxmox VE sets f= or the script aren't enough? So that we've a better picture about possible optio= ns. cheers, Thomas