From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>,
"Phillipp Röll" <pr@lima-city.de>
Subject: Re: [pve-devel] [PATCH] Check only first part of script parameter for executability
Date: Thu, 21 Oct 2021 11:05:30 +0200 [thread overview]
Message-ID: <a8bc704f-7b6a-a4ed-b243-77d3549fe6f7@proxmox.com> (raw)
In-Reply-To: <20211021084650.26753-1-pr@lima-city.de>
Hi,
thanks for your effort in contributing to Proxmox VE!
A few things inline
On 21.10.21 10:46, Phillipp Röll 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:
>
> vzdump 100 --script "/usr/local/bin/myscript.pl myarg"
>
> 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 <office@proxmox.com>. 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(-)
>
> 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 = $opts->{script};
> return if !$script;
>
> - if (!-x $script) {
> + my @script_args = 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 for the
script aren't enough? So that we've a better picture about possible options.
cheers,
Thomas
next prev parent reply other threads:[~2021-10-21 9:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-21 8:46 Phillipp Röll
2021-10-21 9:05 ` Thomas Lamprecht [this message]
2021-10-21 18:15 ` Phillipp Röll
2021-10-22 7:36 ` Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a8bc704f-7b6a-a4ed-b243-77d3549fe6f7@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=pr@lima-city.de \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox