mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...
Date: Sat, 08 Apr 2006 01:27:29 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Branch:         
Changes by:     spiralvoice <address@hidden>    06/04/08 01:27:29

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonNetwork.ml commonOptions.ml 
        src/networks/donkey: donkeyGlobals.ml donkeyInteractive.ml 
                             donkeyMain.ml donkeyOptions.ml 
        src/utils/lib  : autoconf.ml.new.in 

Log message:
        patch #5027

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/distrib/ChangeLog.diff?tr1=1.789&tr2=1.790&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonNetwork.ml.diff?tr1=1.26&tr2=1.27&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonOptions.ml.diff?tr1=1.137&tr2=1.138&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyGlobals.ml.diff?tr1=1.77&tr2=1.78&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyInteractive.ml.diff?tr1=1.96&tr2=1.97&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyMain.ml.diff?tr1=1.47&tr2=1.48&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/networks/donkey/donkeyOptions.ml.diff?tr1=1.39&tr2=1.40&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/utils/lib/autoconf.ml.new.in.diff?tr1=1.22&tr2=1.23&r1=text&r2=text

Patches:
Index: mldonkey/distrib/ChangeLog
diff -u mldonkey/distrib/ChangeLog:1.789 mldonkey/distrib/ChangeLog:1.790
--- mldonkey/distrib/ChangeLog:1.789    Thu Apr  6 21:51:40 2006
+++ mldonkey/distrib/ChangeLog  Sat Apr  8 01:27:29 2006
@@ -14,6 +14,9 @@
 ChangeLog
 =========
 
+2006/04/08
+5027: EDK: Deactivate DonkeySUI if /dev/urandom is missing
+
 2006/04/06
 5021: Fix compile bug in tryopen patch when bzip2 is disabled
 5020: Allow compile with Ocaml 3.09.2 CVS code,
Index: mldonkey/src/daemon/common/commonNetwork.ml
diff -u mldonkey/src/daemon/common/commonNetwork.ml:1.26 
mldonkey/src/daemon/common/commonNetwork.ml:1.27
--- mldonkey/src/daemon/common/commonNetwork.ml:1.26    Thu Jan 26 00:25:24 2006
+++ mldonkey/src/daemon/common/commonNetwork.ml Sat Apr  8 01:27:29 2006
@@ -280,7 +280,7 @@
   Hashtbl.add networks_by_num r.network_num r;
   let s =
     if r.network_name = "Donkey" then
-      if Autoconf.donkey_sui = "yes" then
+      if Autoconf.donkey_sui_works () then
         "Donkey (SUI)"
       else
         "Donkey (noSUI)"
Index: mldonkey/src/daemon/common/commonOptions.ml
diff -u mldonkey/src/daemon/common/commonOptions.ml:1.137 
mldonkey/src/daemon/common/commonOptions.ml:1.138
--- mldonkey/src/daemon/common/commonOptions.ml:1.137   Mon Apr  3 20:50:08 2006
+++ mldonkey/src/daemon/common/commonOptions.ml Sat Apr  8 01:27:29 2006
@@ -102,9 +102,10 @@
 a new instance here. If you are sure no other process uses
 this directory delete %s and restart the core.\n" file
 
-let exit_message_dev file = Printf.sprintf
-"\n/dev/%s does not exist, please create it, exiting...
-If you are using a chroot environment, create it inside the chroot.\n" file
+let exit_message_dev file exit = Printf.sprintf
+"\n/dev/%s does not exist, please create it%s
+If you are using a chroot environment, create it inside the chroot.\n"
+  file (if exit then ", exiting..." else "")
 
 let _ =
   lprintf_nl "Starting MLDonkey %s ... " Autoconf.current_version;
@@ -152,17 +153,20 @@
     end;
 
   if (String2.starts_with (Filename.basename Sys.argv.(0)) "mlnet")
-    && not Autoconf.windows && not (Autoconf.system = "morphos") &&
-       Autoconf.donkey_sui = "yes" && not (Sys.file_exists "/dev/urandom") 
then begin
-      lprintf "%s" (exit_message_dev "urandom");
+    && not Autoconf.windows && not (Autoconf.system = "morphos")
+    && Autoconf.donkey_sui = "yes" && not (Sys.file_exists "/dev/urandom") then
+    begin
+      Autoconf.donkey_sui_urandom := false;
+      lprintf "%s" (exit_message_dev "urandom" false);
       if Autoconf.system = "hpux" then
         lprintf_nl "For HP-UX get urandom support from 
http://www.josvisser.nl/hpux11-random";;
-      exit 2
-    end;  
+    end
+  else
+    Autoconf.donkey_sui_urandom := true;
 
   if (String2.starts_with (Filename.basename Sys.argv.(0)) "mlnet")
     && not Autoconf.windows && not (Sys.file_exists "/dev/null") then begin
-      lprintf "%s" (exit_message_dev "null");
+      lprintf "%s" (exit_message_dev "null" true);
       exit 2
     end;  
 
Index: mldonkey/src/networks/donkey/donkeyGlobals.ml
diff -u mldonkey/src/networks/donkey/donkeyGlobals.ml:1.77 
mldonkey/src/networks/donkey/donkeyGlobals.ml:1.78
--- mldonkey/src/networks/donkey/donkeyGlobals.ml:1.77  Wed Mar 29 15:41:33 2006
+++ mldonkey/src/networks/donkey/donkeyGlobals.ml       Sat Apr  8 01:27:29 2006
@@ -958,7 +958,7 @@
 
 let _ =
   option_hook client_private_key (fun _ ->
-    if Autoconf.donkey_sui = "yes" then begin
+    if Autoconf.donkey_sui_works () then begin
     client_public_key := DonkeySui.SUI.load_key (!!client_private_key);
     (
     let key_checked = ref false in
Index: mldonkey/src/networks/donkey/donkeyInteractive.ml
diff -u mldonkey/src/networks/donkey/donkeyInteractive.ml:1.96 
mldonkey/src/networks/donkey/donkeyInteractive.ml:1.97
--- mldonkey/src/networks/donkey/donkeyInteractive.ml:1.96      Mon Apr  3 
20:50:09 2006
+++ mldonkey/src/networks/donkey/donkeyInteractive.ml   Sat Apr  8 01:27:29 2006
@@ -969,7 +969,7 @@
 
     "reset_md4", Arg_none (fun _ ->
         set_simple_option donkey_ini "client_md4" (Md4.to_string (mldonkey_md4 
(Md4.random ())));
-        if Autoconf.donkey_sui = "yes" then set_simple_option donkey_ini 
"client_private_key" (DonkeySui.SUI.create_key ());
+        if Autoconf.donkey_sui_works () then set_simple_option donkey_ini 
"client_private_key" (DonkeySui.SUI.create_key ());
         "reset client_md4/client_private_key"
     ), ":\t\t\t\treset client_md4/client_private_key to random values";
 
Index: mldonkey/src/networks/donkey/donkeyMain.ml
diff -u mldonkey/src/networks/donkey/donkeyMain.ml:1.47 
mldonkey/src/networks/donkey/donkeyMain.ml:1.48
--- mldonkey/src/networks/donkey/donkeyMain.ml:1.47     Sat Feb 11 14:43:20 2006
+++ mldonkey/src/networks/donkey/donkeyMain.ml  Sat Apr  8 01:27:29 2006
@@ -188,7 +188,7 @@
     let enabler = ref true in
     is_enabled := true;
     network.op_network_disable <- disable enabler;
-    if Autoconf.donkey_sui = "yes" then
+    if Autoconf.donkey_sui_works () then
     (try
       client_public_key := DonkeySui.SUI.load_key (!!client_private_key)
     with _ -> ());
@@ -301,7 +301,7 @@
       Options.option_hook global_login reset_tags;
       Options.option_hook login reset_tags;
       Options.option_hook enable_sui ( fun _ ->
-       if Autoconf.donkey_sui = "no" && !!enable_sui then enable_sui =:= false;
+       if not (Autoconf.donkey_sui_works ()) && !!enable_sui then enable_sui 
=:= false;
        reset_tags ());
                                
 (**** START TIMERS ****)
Index: mldonkey/src/networks/donkey/donkeyOptions.ml
diff -u mldonkey/src/networks/donkey/donkeyOptions.ml:1.39 
mldonkey/src/networks/donkey/donkeyOptions.ml:1.40
--- mldonkey/src/networks/donkey/donkeyOptions.ml:1.39  Mon Feb  6 21:45:04 2006
+++ mldonkey/src/networks/donkey/donkeyOptions.ml       Sat Apr  8 01:27:29 2006
@@ -153,7 +153,8 @@
     "The MD4 of this client" Md4.option (mldonkey_md4 (Md4.random ()))
 
 let client_private_key = define_option donkey_section ["client_private_key"]
-    "The RSA private key of this client" string_option 
(DonkeySui.SUI.create_key ())
+    "The RSA private key of this client"
+    string_option (if Autoconf.donkey_sui_works () then 
DonkeySui.SUI.create_key () else "")
 
 let enable_sui = define_option donkey_section ["enable_sui"]
     "Enable secure user identification support" bool_option true
Index: mldonkey/src/utils/lib/autoconf.ml.new.in
diff -u mldonkey/src/utils/lib/autoconf.ml.new.in:1.22 
mldonkey/src/utils/lib/autoconf.ml.new.in:1.23
--- mldonkey/src/utils/lib/autoconf.ml.new.in:1.22      Thu Jan 26 00:25:25 2006
+++ mldonkey/src/utils/lib/autoconf.ml.new.in   Sat Apr  8 01:27:29 2006
@@ -25,7 +25,9 @@
 let bittorrent = "@BITTORRENT@"
 let donkey = "@DONKEY@"
 let donkey_sui = "@DONKEY_SUI@"
-  
+let donkey_sui_urandom = ref false
+let donkey_sui_works () = donkey_sui = "yes" && !donkey_sui_urandom
+
 exception OutOfBoundsAccess
 let outofboundsaccess = OutOfBoundsAccess
   




reply via email to

[Prev in Thread] Current Thread [Next in Thread]