From cf6454a1b253861a7167037e07cc2693bf4fe66a Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Mon, 15 Sep 2008 00:44:23 +0200 Subject: [PATCH] Switch host and hostname in update cgi for sudopasswd (so "gluck" gets displayed and "gluck.debian.org" stored). --- debian/changelog | 7 +++++++ update.cgi | 5 +++-- 2 files changed, 10 insertions(+), 2 deletions(-) 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 .= "