diff --git a/checkin_notes b/checkin_notes index 809ff93e75..0d0b937079 100755 --- a/checkin_notes +++ b/checkin_notes @@ -9210,3 +9210,19 @@ David Jan 15 2004 lib/ base64.h (new) + +David Jan 15 2004 + - changed file_upload_handler so that it returns success + if offset >= nbytes. + That this happens at all indicates an error in the client, + but we'll get to that later. + - Scheduler: if last RPC too recent, show the interval + + html_user/ + db.inc + info.php + team_join_action.php + team_quit_action.php + sched/ + file_upload_handler.C + handle_request.C diff --git a/html/user/db.inc b/html/user/db.inc index a8c5236ef0..cd64e8775c 100644 --- a/html/user/db.inc +++ b/html/user/db.inc @@ -35,7 +35,7 @@ function lookup_user_auth($auth) { } function lookup_user_id($id) { - $result = mysql_query("select * from user where id='$id'"); + $result = mysql_query("select * from user where id=$id"); if ($result) { $user = mysql_fetch_object($result); mysql_free_result($result); @@ -45,7 +45,7 @@ function lookup_user_id($id) { } function lookup_host($id) { - $result = mysql_query("select * from host where id='$id'"); + $result = mysql_query("select * from host where id=$id"); if ($result) { $host = mysql_fetch_object($result); mysql_free_result($result); @@ -55,7 +55,7 @@ function lookup_host($id) { } function lookup_team($id) { - $result = mysql_query("select * from team where id='$id'"); + $result = mysql_query("select * from team where id=$id"); if ($result) { $team = mysql_fetch_object($result); mysql_free_result($result); @@ -65,7 +65,7 @@ function lookup_team($id) { } function lookup_wu($id) { - $result = mysql_query("select * from workunit where id='$id'"); + $result = mysql_query("select * from workunit where id=$id"); if ($result) { $wu = mysql_fetch_object($result); mysql_free_result($result); @@ -75,7 +75,7 @@ function lookup_wu($id) { } function lookup_app($id) { - $result = mysql_query("select * from app where id='$id'"); + $result = mysql_query("select * from app where id=$id"); if ($result) { $app = mysql_fetch_object($result); mysql_free_result($result); diff --git a/html/user/info.php b/html/user/info.php index e90e5c58cb..bfe51f5725 100644 --- a/html/user/info.php +++ b/html/user/info.php @@ -2,84 +2,98 @@ require_once('db.inc'); require_once('util.inc'); db_init(); + page_head('Rules and Policies'); -?> +echo "

Rules and Policies

-

Run only on authorized computers

+

Run", PROJECT, " only on authorized computers

-Run only on computers that you own, or for which you have obtained the owner's permission. -Some companies and schools have policies that prohibit using their computers for projects such as . +Run ", PROJECT, " only on computers that you own, +or for which you have obtained the owner's permission. +Some companies and schools have policies that prohibit using their computers +for projects such as ",PROJECT, ".

-

How will use your computer

+

How ", PROJECT, "will use your computer

-When you run on your computer, it will use part of the computer's CPU power, disk space, and network bandwidth. -You can control how much of your resources are used by , and when it uses them. +When you run ", PROJECT, " on your computer, +it will use part of the computer's CPU power, disk space, and network bandwidth. +You can control how much of your resources are used by ", PROJECT, ", +and when it uses them.

-The work done by your computer contributes to the academic nonprofit research being performed by . -The current research is described here. +The work done by your computer contributes to the +academic nonprofit research being performed by ", PROJECT, ". +The current research is described here. The application programs may change from time to time.

Privacy policy

-Your account on is identified by a name that you choose. -This name may be shown on the web site, along with a summary of the work your computer has done for and other BOINC projects. +Your account on ", PROJECT, " is identified by a name that you choose. +This name may be shown on the ", PROJECT, " web site, +along with a summary of the work your computer has done for ", PROJECT, " and other BOINC projects. If you want to be anonymous, choose a name that doesn't reveal your identity.

-If you participate in , information about your computer (such as its processor type, amount of memory, etc.) will be recorded by and used to decide what type of work to assign to your computer. -This information will also be shown on 's web site. -Nothing that reveals your computer's location (e.g. its domain name or network address) will be shown. +If you participate in ", PROJECT, ", information about your computer +(such as its processor type, amount of memory, etc.) +will be recorded by ", PROJECT, " and used to decide +what type of work to assign to your computer. +This information will also be shown on ", PROJECT, "'s web site. +Nothing that reveals your computer's location +(e.g. its domain name or network address) will be shown.

-To participate in , you must give an address where you receive email. -This address will not be shown on the web site or shared with organizations. - may send you periodic newsletters; however, you can choose not to be sent these at any time. +To participate in ", PROJECT, ", you must give an address where you receive email. +This address will not be shown on the ", PROJECT, " web site or shared with organizations. +", PROJECT, " may send you periodic newsletters; +however, you can choose not to be sent these at any time.

-

Is it safe to run ?

+

Is it safe to run ", PROJECT, " ?

Any time you download a program through the Internet you are taking a chance: the program might have dangerous errors, or the download server might have been hacked. - has made efforts to minimize these risks. +", PROJECT, " has made efforts to minimize these risks. We have tested our applications carefully. Our servers are behind a firewall and are configured for high security. To ensure the safety of program downloads, all executable files are digitally signed on a secure computer not connected to the Internet.

- was developed at the University of California at Berkeley, by members of the SETI@home project. +", PROJECT, " was developed at the University of California at Berkeley, +by members of the SETI@home project.

Liability

- assumes no liability for damage to your computer, loss of data, or any other event or condition that may occur as a result of participating in . +", PROJECT, " assumes no liability for damage to your computer, +loss of data, or any other event or condition that may occur +as a result of participating in ", PROJECT, ".

Other BOINC projects

-Other projects use the same platform, BOINC, as . +Other projects use the same platform, BOINC, as ", PROJECT, ". You may want to consider participating in one or more of these projects. -By doing so, your computer will do useful work even when has no work available for it. +By doing so, your computer will do useful work even when ", PROJECT, " has no work available for it.

-These other projects are not associated with , and we cannot vouch for their security practices or the nature of their research. +These other projects are not associated with ", PROJECT, ", and we cannot vouch for their security practices or the nature of their research. Join them at your own risk.

- - diff --git a/html/user/team_join_action.php b/html/user/team_join_action.php index 9aa3b8cb5b..6036eca521 100644 --- a/html/user/team_join_action.php +++ b/html/user/team_join_action.php @@ -8,7 +8,7 @@ $user = get_logged_in_user(); $teamid = $_POST["teamid"]; - team = lookup_team($teamid); + $team = lookup_team($teamid); require_team($team); if ($user->teamid == $team->id) { page_head("Unable to add $user->name"); diff --git a/html/user/team_quit_action.php b/html/user/team_quit_action.php index b8c3d2f9ce..fc30a327a1 100644 --- a/html/user/team_quit_action.php +++ b/html/user/team_quit_action.php @@ -5,7 +5,7 @@ db_init(); $user = get_logged_in_user(); - $teamid = $_POST["id"] + $teamid = $_POST["id"]; $team = lookup_team($teamid); if ($user->teamid == $team->id) { diff --git a/sched/file_upload_handler.C b/sched/file_upload_handler.C index fdbce1d75c..c5a3e9693e 100644 --- a/sched/file_upload_handler.C +++ b/sched/file_upload_handler.C @@ -22,6 +22,9 @@ // Revision History: // // $Log$ +// Revision 1.54 2004/01/15 21:24:55 boincadm +// *** empty log message *** +// // Revision 1.53 2003/12/17 19:14:17 korpela // Added include of (when found) to get definition of gethostname() // under solaris. @@ -215,8 +218,9 @@ int handle_file_upload(FILE* in, R_RSA_PUBLIC_KEY& key) { ); if (retval || !is_valid) { log_messages.printf(SchedMessages::CRITICAL, - "verify_string() = %d, is_valid = %d\n", - retval, is_valid); + "verify_string() = %d, is_valid = %d\n", + retval, is_valid + ); log_messages.printf_multiline(SchedMessages::NORMAL, file_info.signed_xml, "signed xml: "); log_messages.printf_multiline(SchedMessages::NORMAL, file_info.xml_signature, "signature: "); return return_error(ERR_PERMANENT, "invalid signature"); @@ -258,6 +262,14 @@ int handle_file_upload(FILE* in, R_RSA_PUBLIC_KEY& key) { get_remote_addr(), offset, nbytes ); + if (offset >= nbytes) { + log_messages.printf( + SchedMessages::CRITICAL, + "ERROR: offset >= nbytes!!\n" + ); + return_success(0); + break; + } retval = copy_socket_to_file(in, path, offset, nbytes); if (!retval) { return_success(0); diff --git a/sched/handle_request.C b/sched/handle_request.C index 3ad59d8fce..7638705398 100644 --- a/sched/handle_request.C +++ b/sched/handle_request.C @@ -1093,6 +1093,10 @@ void process_request( SchedMessages::NORMAL, "Not sending work - last RPC too recent: %f\n", diff ); + sprintf(reply.message, + "Not sending work - last RPC too recent: %d sec", (int)diff + ); + strcpy(reply.message_priority, "low"); } } if (ok_to_send) {