From: Thomas Lamprecht Date: Fri, 17 Nov 2023 13:23:50 +0000 (+0100) Subject: cluster setup: drop max-size override for file_get_contents calls X-Git-Url: https://git.proxmox.com/?p=pve-cluster.git;a=commitdiff_plain;h=ebcef77ffd0edd966ce0517f457becace92e5a88 cluster setup: drop max-size override for file_get_contents calls We switched the default to match pmxcfs again (after its limit increase for Proxmox VE 7) to 1024 * 1024 (= 1 MiB), so not required to override the limit here, as we actually made it lower, not higher. Signed-off-by: Thomas Lamprecht --- diff --git a/src/PVE/Cluster/Setup.pm b/src/PVE/Cluster/Setup.pm index fc375ab..07020d7 100644 --- a/src/PVE/Cluster/Setup.pm +++ b/src/PVE/Cluster/Setup.pm @@ -98,14 +98,14 @@ sub ssh_merge_keys { my $data = ''; if (-f $ssh_cluster_authorized_keys) { - $data = PVE::Tools::file_get_contents($ssh_cluster_authorized_keys, 128*1024); + $data = PVE::Tools::file_get_contents($ssh_cluster_authorized_keys); chomp($data); } my $found_backup; if (-f $ssh_root_authorized_keys_backup) { $data .= "\n"; - $data .= PVE::Tools::file_get_contents($ssh_root_authorized_keys_backup, 128*1024); + $data .= PVE::Tools::file_get_contents($ssh_root_authorized_keys_backup); chomp($data); $found_backup = 1; } @@ -181,7 +181,7 @@ sub setup_ssh_keys { if (! -f $ssh_cluster_authorized_keys) { my $old; if (-f $ssh_root_authorized_keys) { - $old = PVE::Tools::file_get_contents($ssh_root_authorized_keys, 128*1024); + $old = PVE::Tools::file_get_contents($ssh_root_authorized_keys); } if (my $fh = IO::File->new ($ssh_cluster_authorized_keys, O_CREAT|O_WRONLY|O_EXCL, 0400)) { PVE::Tools::safe_print($ssh_cluster_authorized_keys, $fh, $old) if $old; @@ -214,7 +214,7 @@ sub ssh_unmerge_known_hosts { return if ! -l $ssh_system_known_hosts; my $old = ''; - $old = PVE::Tools::file_get_contents($ssh_cluster_known_hosts, 128*1024) + $old = PVE::Tools::file_get_contents($ssh_cluster_known_hosts) if -f $ssh_cluster_known_hosts; PVE::Tools::file_set_contents($ssh_system_known_hosts, $old); @@ -238,12 +238,12 @@ sub ssh_merge_known_hosts { } } - my $old = PVE::Tools::file_get_contents($ssh_cluster_known_hosts, 128*1024); + my $old = PVE::Tools::file_get_contents($ssh_cluster_known_hosts); my $new = ''; if ((! -l $ssh_system_known_hosts) && (-f $ssh_system_known_hosts)) { - $new = PVE::Tools::file_get_contents($ssh_system_known_hosts, 128*1024); + $new = PVE::Tools::file_get_contents($ssh_system_known_hosts); } my $hostkey = PVE::Tools::file_get_contents($ssh_host_rsa_id);