From e9383a4252abb03ac55d544464deb08792fb7a48 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 24 Jan 2005 18:24:26 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=5196 --- checkin_notes | 6 ++++ doc/cpid.php | 35 +++++++++++++------ doc/credit.php | 3 +- doc/flops.php | 22 ++++++++++++ lib/proxy_info.C | 91 ++++++++++++++++++++++++++++++------------------ 5 files changed, 113 insertions(+), 44 deletions(-) create mode 100644 doc/flops.php diff --git a/checkin_notes b/checkin_notes index 8a3eff5ac8..31462417ae 100755 --- a/checkin_notes +++ b/checkin_notes @@ -23196,3 +23196,9 @@ Bruce 24 Jan 2005 project.sample/ project.inc +David 24 Jan 2005 + - Save proxy user names and passwords to disk in XML-escaped form + (so passwords of the form X Leaderboard sites may show statistics from several BOINC projects, -and some people may want to see their credit +and may want to show credit for users and/or hosts summed across all the projects in which they participate. -This turns out to be a little tricky. -When should accounts on different projects be considered equivalent? -The simplest answer is: when they have the same email address. -But we can't export email addresses. -And we can't export hashed email addresses, + +

Cross-project identification of hosts

+ +

+Each host generates an internal cross-project ID, +which is the MD5 of the concatenation of its +domain name, IP address, free disk space, and a timestamp. +This is reported to the projects that to which the host is attached. +The projects convert it to an external cross-project ID +by hashing it with the owner's email address +(this is intended to prevent spoofing). +The external ID is exported in statistics files. + +

Cross-project identification of participants

+

+Accounts on different projects are considered equivalent +if they have the same email address +(we have considered other concepts, but they all lead to extreme complexity). + +

+Projects can't export email addresses in statistics files; +email addresses are private. +It's also not desirable to export hashed email addresses, because spammers could enumerate feasible email addresses and compare them with the hashed addresses.

-BOINC uses the following system: +Instead, BOINC uses the following system:

These benchmarks are imperfect predictors of application performance, but they're good enough. +

Eventually, credit may reflect network transfer and disk storage as well as computation. diff --git a/doc/flops.php b/doc/flops.php new file mode 100644 index 0000000000..b010a9c855 --- /dev/null +++ b/doc/flops.php @@ -0,0 +1,22 @@ + +GigaFLOPs = RAC/100 +TeraFLOPS = RAC/100,000 + +(Remember that a 1 GigaFLOP machine, running full time, +produces 100 units of credit in 1 day). +

+The credit figures for a particular day may be distorted +if a project is catching up or falling behind on validation +(the process or granting credit). +Thus to get accurate FLOPS estimates you should +look at average RAC over a period of a week or so. +"; +page_tail(); +?> diff --git a/lib/proxy_info.C b/lib/proxy_info.C index c85c90be85..1696b1f2d5 100644 --- a/lib/proxy_info.C +++ b/lib/proxy_info.C @@ -17,6 +17,9 @@ // or write to the Free Software Foundation, Inc., // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +#include +using std::string; + #ifdef _WIN32 #include "boinc_win.h" #endif @@ -26,6 +29,7 @@ int PROXY_INFO::parse(MIOFILE& in) { char buf[256]; + string s5un, s5up, hun, hup, temp; memset(this, 0, sizeof(PROXY_INFO)); while (in.fgets(buf, 256)) { @@ -38,44 +42,65 @@ int PROXY_INFO::parse(MIOFILE& in) { else if (parse_int(buf, "", socks_server_port)) continue; else if (parse_str(buf, "", http_server_name, sizeof(http_server_name))) continue; else if (parse_int(buf, "", http_server_port)) continue; - else if (parse_str(buf, "", socks5_user_name, sizeof(socks5_user_name))) continue; - else if (parse_str(buf, "", socks5_user_passwd, sizeof(socks5_user_passwd))) continue; - else if (parse_str(buf, "", http_user_name, sizeof(http_user_name))) continue; - else if (parse_str(buf, "", http_user_passwd, sizeof(http_user_passwd))) continue; + else if (parse_str(buf, "", s5un)) { + xml_unescape(s5un, temp); + strcpy(socks5_user_name, temp.c_str()); + continue; + } + else if (parse_str(buf, "", s5up)) { + xml_unescape(s5up, temp); + strcpy(socks5_user_passwd, temp.c_str()); + continue; + } + else if (parse_str(buf, "", hun)) { + xml_unescape(hun, temp); + strcpy(http_user_name, temp.c_str()); + continue; + } + else if (parse_str(buf, "", hup)) { + xml_unescape(hup, temp); + strcpy(http_user_passwd, temp.c_str()); + continue; + } } return 0; } int PROXY_INFO::write(MIOFILE& out) { - out.printf( - "\n" - "%s" - "%s" - "%s" - " %d\n" - " %s\n" - " %d\n" - " %s\n" - " %d\n" - " %s\n" - " %s\n" - " %s\n" - " %s\n" - "\n", - use_http_proxy?" \n":"", - use_socks_proxy?" \n":"", - use_http_auth?" \n":"", - socks_version, - socks_server_name, - socks_server_port, - http_server_name, - http_server_port, - socks5_user_name, - socks5_user_passwd, - http_user_name, - http_user_passwd - ); - return 0; + string s5un, s5up, hun, hup; + xml_escape(socks5_user_name, s5un); + xml_escape(socks5_user_passwd, s5up); + xml_escape(http_user_name, hun); + xml_escape(http_user_passwd, hup); + out.printf( + "\n" + "%s" + "%s" + "%s" + " %d\n" + " %s\n" + " %d\n" + " %s\n" + " %d\n" + " %s\n" + " %s\n" + " %s\n" + " %s\n" + "\n", + use_http_proxy?" \n":"", + use_socks_proxy?" \n":"", + use_http_auth?" \n":"", + socks_version, + socks_server_name, + socks_server_port, + http_server_name, + http_server_port, + s5un.c_str(), + s5up.c_str(), + hun.c_str(), + hup.c_str() + ); + return 0; } void PROXY_INFO::clear() {