gunnar: server/perl-kolab/sbin kolab_bootstrap.in,1.16,1.17

cvs at kolab.org cvs at kolab.org
Tue Jan 5 18:46:02 CET 2010


Author: gunnar

Update of /kolabrepository/server/perl-kolab/sbin
In directory doto:/tmp/cvs-serv1015/sbin

Modified Files:
	kolab_bootstrap.in 
Log Message:
MFB: kolab/issue919  (kolab server has problems with some characters in passwords). While the patches actually did not solve the problem they also did not make it worse. They simply inverted the problem and you get double encoded UTF-8 characters in passwords now when using UTF-8 only. So this was merged from the kolab_2_2_branch to have the same state in both branches.

Index: kolab_bootstrap.in
===================================================================
RCS file: /kolabrepository/server/perl-kolab/sbin/kolab_bootstrap.in,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- kolab_bootstrap.in	1 Jan 2010 21:53:25 -0000	1.16
+++ kolab_bootstrap.in	5 Jan 2010 17:46:00 -0000	1.17
@@ -65,6 +65,7 @@
 use Time::localtime;
 use Digest::SHA1;
 use MIME::Base64;
+use Encode;
 
 # Reload only kolab.globals into our configuration.
 Kolab::reloadConfig("@CONFIG_DIR@/kolab.globals", 1);
@@ -401,8 +402,8 @@
     if ($bind_pw =~ /\@\@\@/) {
       $bind_pw = `$Kolab::config{'bindir'}/openssl rand -base64 12`;
       chomp $bind_pw;
-      $bind_pw = getUserInput("Please choose a manager password", $bind_pw);
-      print " bind_pw : $bind_pw\n";
+      $bind_pw = Encode::encode_utf8(getUserInput("Please choose a manager password", $bind_pw));
+      print " bind_pw : " . Encode::decode_utf8($bind_pw) . "\n";
       $bind_pw_hash = hashPassword2($bind_pw);
     }
 
@@ -440,7 +441,7 @@
     chmod 0600, $kolab_config;
     kolab_chown "$Kolab::config{'kolab_musr'}","$Kolab::config{'kolab_mgrp'}", $kolab_config;
     print "IMPORTANT NOTE:\n";
-    print "use login=manager and passwd=$bind_pw when you log into the webinterface!\n\n";
+    print "use login=manager and passwd=" . Encode::decode_utf8($bind_pw) . " when you log into the webinterface!\n\n";
   }
 
   # Set up slapd to replicate to slave server's kolabds
@@ -750,7 +751,7 @@
   print "proceeding with base DN $base_dn\n";
 
   $bind_dn = "cn=manager,cn=internal,$base_dn";
-  $bind_pw = getUserInput("Manager password");
+  $bind_pw = Encode::encode_utf8(getUserInput("Manager password"));
   $bind_pw_hash = hashPassword2($bind_pw);
 
   my $confname = "$Kolab::config{'sasl_smtpconffile'}";
@@ -942,5 +943,5 @@
 #system("@CONFIG_DIR@/kolab_sslcert.sh $fqdn");
 print "kolab is now ready to run!\n";
 print "please run '$Kolab::config{'KOLABRC'} rc all start'\n";
-print ("Use login=manager and passwd=$bind_pw when you log into\n");
+print ("Use login=manager and passwd=" . Encode::decode_utf8($bind_pw) . " when you log into\n");
 print ("the webinterface https://$fqdn$Kolab::config{'kolab_wui'} !\n");





More information about the commits mailing list