From c9d0b1fe8fc04b9497a3abe19d704fb8177d18f3 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sat, 15 Oct 2005 05:08:59 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=8680 --- checkin_notes | 6 ++++++ doc/files.php | 2 ++ doc/gui_rpc.php | 12 +++++++----- lib/hostinfo.C | 13 +++++++++---- lib/hostinfo.h | 1 + 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/checkin_notes b/checkin_notes index 1fa52f03ee..12e665569d 100755 --- a/checkin_notes +++ b/checkin_notes @@ -13136,3 +13136,9 @@ David 13 Oct 2005 client/ pers_file_xfer.C + +David 13 Oct 2005 + - generalize random-string generator + + lib/ + hostinfo.C,h diff --git a/doc/files.php b/doc/files.php index fa434417c5..e82b1a3328 100644 --- a/doc/files.php +++ b/doc/files.php @@ -72,6 +72,8 @@ list_item("executable", list_item("upload_when_present", "If present, indicates that the file should be uploaded when the application finishes. + The file is uploaded even if the application doesn't + finish successfully. "); list_item("sticky", "If present, indicates that the file should be retained diff --git a/doc/gui_rpc.php b/doc/gui_rpc.php index d7258c4f53..22f6354cfe 100644 --- a/doc/gui_rpc.php +++ b/doc/gui_rpc.php @@ -182,25 +182,27 @@ Each reply message ends with the character '\\003.

Since GUI RPCs can control the BOINC client (e.g. attaching/detaching projects) -it is important to protect your BOINC client -from unauthorized control. +it is important to protect your BOINC client from unauthorized control. There are two levels of protection:

+A GUI RPC is handled only if it passes both levels of protection.

Password protection

If you place a password in a file gui_rpc_auth.cfg in your BOINC directory, GUI RPCs must be authenticated using the password. +

+If this file is not present, there is no password protection.

Remote host restriction

-By default the core client accepts GUI RPCs -only from the same host. +By default the core client accepts GUI RPCs only from the same host.

You can allow remote hosts to control a core client in two ways: diff --git a/lib/hostinfo.C b/lib/hostinfo.C index 8c3069a629..a694dee75c 100644 --- a/lib/hostinfo.C +++ b/lib/hostinfo.C @@ -190,14 +190,19 @@ int HOST_INFO::write_cpu_benchmarks(FILE* out) { return 0; } +void HOST_INFO::make_random_string(char* salt, char* out) { + char buf[1024]; + + sprintf(buf, "%f%s%s%f%s", dtime(), domain_name, ip_addr, d_free, salt); + md5_block((const unsigned char*) buf, (int)strlen(buf), out); +} + // make a host cross-project ID. // Should be unique across hosts with very high probability // void HOST_INFO::generate_host_cpid() { - char buf[1024]; - - sprintf(buf, "%f%s%s%f", dtime(), domain_name, ip_addr, d_free); - md5_block((const unsigned char*) buf, (int)strlen(buf), host_cpid); + make_random_string("", host_cpid); } + const char *BOINC_RCSID_edf7e5c147 = "$Id$"; diff --git a/lib/hostinfo.h b/lib/hostinfo.h index 47c1f898e3..f9eae2e0bd 100644 --- a/lib/hostinfo.h +++ b/lib/hostinfo.h @@ -69,6 +69,7 @@ public: bool users_idle(bool check_all_logins, double idle_time_to_run); int get_host_info(); void clear_host_info(); + void make_random_string(char* salt, char* out); void generate_host_cpid(); };