[pve-devel] [PATCH] - preserve authorized_key key order - identify double keys by key and not by comment

Dietmar Maurer dietmar at proxmox.com
Thu Aug 30 06:52:17 CEST 2012


> Subject: [pve-devel] [PATCH] - preserve authorized_key key order - identify
> double keys by key and not by comment
> 
> 
> Signed-off-by: Stefan Priebe <s.priebe at profihost.ag>
> ---
>  data/PVE/Cluster.pm |   26 ++++++++++++--------------
>  1 file changed, 12 insertions(+), 14 deletions(-)
> 
> diff --git a/data/PVE/Cluster.pm b/data/PVE/Cluster.pm index
> a877d41..4d5b9ac 100644
> --- a/data/PVE/Cluster.pm
> +++ b/data/PVE/Cluster.pm
> @@ -1002,29 +1002,27 @@ sub ssh_merge_keys {
> 
>      my $data = '';
>      if (-f $sshauthkeys) {
> -	$data = PVE::Tools::file_get_contents($sshauthkeys, 128*1024);
> -	chomp($data);
> +        $data = PVE::Tools::file_get_contents($sshauthkeys, 128*1024);
> +        chomp($data);
>      }
> 
>      # always add ourself
>      if (-f $ssh_rsa_id) {
> -	my $pub = PVE::Tools::file_get_contents($ssh_rsa_id);
> -	chomp($pub);
> -	$data .= "\n$pub\n";
> +        my $pub = PVE::Tools::file_get_contents($ssh_rsa_id);
> +        chomp($pub);
> +        $data .= "\n$pub\n";
>      }

What is the purpose of those changes?




More information about the pve-devel mailing list