Switch host and hostname in update cgi for sudopasswd (so "gluck" gets
authorPeter Palfrader <peter@palfrader.org>
Sun, 14 Sep 2008 22:44:23 +0000 (00:44 +0200)
committerPeter Palfrader <peter@palfrader.org>
Sun, 14 Sep 2008 22:44:23 +0000 (00:44 +0200)
displayed and "gluck.debian.org" stored).

debian/changelog
update.cgi

index be4c49e..9e192c3 100644 (file)
@@ -1,3 +1,10 @@
+userdir-ldap-cgi (0.3.16) unstable; urgency=low
+
+  * Switch host and hostname in update cgi for sudopasswd (so "gluck" gets
+    displayed and "gluck.debian.org" stored).
+
+ -- Peter Palfrader <weasel@debian.org>  Mon, 15 Sep 2008 00:43:55 +0200
+
 userdir-ldap-cgi (0.3.15) unstable; urgency=low
 
   * Allow setting of userpassword.
index 3077e6a..223559f 100755 (executable)
@@ -133,7 +133,8 @@ if (!($query->param('doupdate'))) {
                  <td><input name=\"sudopassword-delete-$uuid\" type=\"checkbox\" value=\"delete\"> (delete)</td></tr>\n";
     $sudopassword .= $e;
     if ($status eq 'unconfirmed') {
-      my $hmac = hmac_sha1_hex( join(':', 'confirm-new-password', $uuid, $hosts, $crypted), $hmac_key);
+      my $data = join(':', 'confirm-new-password', $uuid, $hosts, $crypted);
+      my $hmac = hmac_sha1_hex( $data, $hmac_key);
       $confirmstring .= "confirm sudopassword $uuid $hosts $hmac\n";
     }
   };
@@ -146,7 +147,7 @@ if (!($query->param('doupdate'))) {
       my $data = $host_entries->{$dn};
       my $host = $data->{'host'}->[0];
       my $hostname = $data->{'hostname'}->[0];
-      $sudopasswordhosts .= "<option value=\"$host\">$hostname\n";
+      $sudopasswordhosts .= "<option value=\"$hostname\">$host\n";
   };
   $sudopasswordhosts .= '</select>';