[pve-devel] [PATCH pve-manager 1/1] fix #2634: if hook-script without permission, prints message, that the script not executable
Oguz Bektas
o.bektas at proxmox.com
Thu Mar 12 12:29:42 CET 2020
hi,
works fine. also tested with symlinks.
i'd remove the extra whitespace near the end though.
Tested-by: Oguz Bektas <o.bektas at proxmox.com>
On Thu, Mar 12, 2020 at 12:18:18PM +0100, Moayad Almalat wrote:
> Signed-off-by: Moayad Almalat <m.almalat at proxmox.com>
> ---
> PVE/VZDump.pm | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/PVE/VZDump.pm b/PVE/VZDump.pm
> index ada3681e..5f7f7725 100644
> --- a/PVE/VZDump.pm
> +++ b/PVE/VZDump.pm
> @@ -571,6 +571,12 @@ sub run_hook_script {
>
> return if !$script;
>
> + if (!-x $script) {
> + die "The hook-script '$script' is not executable.\n"
> + }
> +
> +
> +
> my $cmd = "$script $phase";
>
> $cmd .= " $task->{mode} $task->{vmid}" if ($task);
> --
> 2.20.1
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
More information about the pve-devel
mailing list