From: Peter Palfrader Date: Sun, 14 Sep 2008 22:44:23 +0000 (+0200) Subject: Switch host and hostname in update cgi for sudopasswd (so "gluck" gets X-Git-Tag: release-0.3.33~57 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap-cgi.git;a=commitdiff_plain;h=cf6454a1b253861a7167037e07cc2693bf4fe66a Switch host and hostname in update cgi for sudopasswd (so "gluck" gets displayed and "gluck.debian.org" stored). --- diff --git a/debian/changelog b/debian/changelog index be4c49e..9e192c3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Mon, 15 Sep 2008 00:43:55 +0200 + userdir-ldap-cgi (0.3.15) unstable; urgency=low * Allow setting of userpassword. diff --git a/update.cgi b/update.cgi index 3077e6a..223559f 100755 --- a/update.cgi +++ b/update.cgi @@ -133,7 +133,8 @@ if (!($query->param('doupdate'))) { (delete)\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 .= "