X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap-cgi.git;a=blobdiff_plain;f=machines.cgi;h=e8670987a80fcd0c357da7aa8481fca8032cab39;hp=bbfdb5819273c4300474ca1694c3865004d4f45f;hb=HEAD;hpb=ec323a550634c324c2d02804795af4364656de25 diff --git a/machines.cgi b/machines.cgi index bbfdb58..e867098 100755 --- a/machines.cgi +++ b/machines.cgi @@ -35,7 +35,6 @@ my (%attrs, @attrorder, %summaryattrs, @summaryorder, %summarylistitems); 'status' => 'Status', 'notes' => 'Notes', 'sshrsahostkey' => 'SSH host key', - 'sshrsahostfprint' => 'SSH host fingerprint', 'description' => 'Description', 'purpose' => 'purposes of this server', # 'createtimestamp' => 'Entry created', @@ -52,11 +51,12 @@ my (%attrs, @attrorder, %summaryattrs, @summaryorder, %summarylistitems); %summaryattrs = ('hostname' => 'Host name', 'host' => 'just for a link', 'description' => 'Description', + 'architecture' => 'Architecture', 'status' => 'Status', 'access' => 'Access', 'sponsor' => 'Sponsor', 'purpose' => 'Purpose'); -@summaryorder = qw{hostname description sponsor purpose status access}; +@summaryorder = qw{hostname description architecture sponsor purpose status access}; %summarylistitems = map {$_=>1} qw{purpose sponsor}; # Global settings... @@ -67,24 +67,6 @@ sub DieHandler { $ldap->unbind if (defined($ldap)); } -# human readable fingerprint -sub sshfingerprint { - my $key = shift; - - return '' if (!$key); - - my @field = split(/ /, $key); - my %keytypes = map {$_=>1} (qw{ssh-dss ssh-rsa ecdsa-sha2-nistp256}); - return '' unless $keytypes{$field[0]}; - return '' if !$field[1]; - my $fpr = md5_hex(decode_base64($field[1])); - my $hrfpr = $field[0] . " " . substr($fpr,0,2,""); - while (length $fpr > 0) { - $hrfpr .= ':' . substr($fpr,0,2,""); - } - return $hrfpr; -} - sub wiki_link($) { my ($in) = @_; # [[hostname|text]] makes a link @@ -169,10 +151,6 @@ foreach $dn (sort {$entries->{$a}->{host}->[0] cmp $entries->{$b}->{host}->[0]} $output{sshrsahostkey} .= $key . "
"; } - foreach $key (@{$data->{sshrsahostkey}}) { - $output{sshrsahostfprint} .= sshfingerprint($key) . "
"; - } - my $sponsor = item_uplist($data->{sponsor}); $output{sponsor} = $sponsor if defined $sponsor; my $purpose = item_uplist($data->{purpose});