*** empty log message ***

svn path=/trunk/boinc/; revision=4076
This commit is contained in:
David Anderson 2004-08-19 15:36:30 +00:00
parent 89a7ffe43f
commit 65b4263a74
6 changed files with 113 additions and 25 deletions

View File

@ -16494,3 +16494,9 @@ Karl 2004-08-18
update_versions
py/Boinc/
tools.py
David 19 Aug 2004
- don't show a zillion digits of precision on file xfer speeds
client/
pers_file_xfer.C

View File

@ -174,8 +174,8 @@ int PERS_FILE_XFER::start_xfer() {
//
bool PERS_FILE_XFER::poll(time_t now) {
int retval;
char pathname[256];
double existing_size = 0;
char pathname[256];
double existing_size = 0;
SCOPE_MSG_LOG scope_messages(log_messages, CLIENT_MSG_LOG::DEBUG_FILE_XFER);
@ -209,7 +209,7 @@ bool PERS_FILE_XFER::poll(time_t now) {
file_size(pathname, existing_size);
if (existing_size != fip->nbytes) {
check_giveup("File downloaded was not the correct file or was garbage from bad URL");
return false;
return false;
} else {
scope_messages.printf(
"PERS_FILE_XFER::poll(): file transfer status %d",
@ -226,9 +226,9 @@ bool PERS_FILE_XFER::poll(time_t now) {
msg_printf(fip->project, MSG_INFO, "No data transferred");
} else {
msg_printf(
fip->project, MSG_INFO, "Approximate throughput %f bytes/sec",
fxp->xfer_speed
);
fip->project, MSG_INFO, "Throughput %d bytes/sec",
(int)fxp->xfer_speed
);
}
}
xfer_done = true;
@ -237,7 +237,7 @@ bool PERS_FILE_XFER::poll(time_t now) {
msg_printf(
fip->project, MSG_INFO, "Permanently failed %s of %s",
is_upload?"upload":"download", fip->name
);
);
}
check_giveup("server rejected file");
} else {
@ -245,7 +245,7 @@ bool PERS_FILE_XFER::poll(time_t now) {
msg_printf(
fip->project, MSG_INFO, "Temporarily failed %s of %s",
is_upload?"upload":"download", fip->name
);
);
}
handle_xfer_failure();
}
@ -256,7 +256,7 @@ bool PERS_FILE_XFER::poll(time_t now) {
fxp = NULL;
return true;
}
}
}
return false;
}

71
doc/code_signing.php Normal file
View File

@ -0,0 +1,71 @@
<?php
require_once("docutil.php");
page_head("Code signing");
echo "
<p>
BOINC uses digital signatures to allow the core client
to authenticate executable files.
<p>
<b>
It is important that you use a proper
code-signing procedure for publicly-accessable projects.
If you don't, and your server is broken into,
hackers will be able to use your BOINC project to distribute
whatever malicious code they want.
This could result in the end of your project,
and possibly the end of all BOINC projects.
</b>
<ul>
<li> Choose a computer
(an old, slow one is fine) to act as your
'code signing machine'.
After being set up,
this computer <b>must remain physically secure
and disconnected from the network</b>
(i.e. keep it in a locked room
and put duct tape over its Ethernet port).
You'll need a mechanism for moving files to and from
the code-signing machine.
A USB-connected disk or CD-RW will work,
or if your files are small you can use a floppy disk.
<li>
Install boinc/lib/crypt_prog on the code signing machine
(it's easiest if the machine runs
Unix/Linux, but it should be easy to compile
crypt_prog for Windows too).
<li>
Run 'crypt_prog -gen_key' to create a code-signing key pair.
Copy the public key to your server.
Keep the private key on the code-signing machine,
and also make a permanent, secure copy of the key pair
(e.g. on a CD-ROM that you keep locked up).
<li>
To sign an executable file, move it to the code-signing machine,
run 'crypt_prog -sign' to produce the signature file,
then move the signature file to your server.
<li>
Use <a href=tool_update_versions.php>update_versions</a>
to install your application,
including its signature files,
in the download directory and database.
</ul>
<p>
There are less-secure variants;
e.g. you could keep the private key on a CD-ROM
that is only mounted during signature generation,
on a machine that is disconnected during signature generation.
But we do not recommend this;
a hacked computer could be running a hidden program that
steals the private key and transmits it when
the computer is connected again.
";
page_tail();
?>

View File

@ -49,20 +49,6 @@ How to develop or port an application program for use with BOINC.
<li><a href=myers.txt>A cookbook</a> (courtesy of Eric Myers from Vassar)
</ul>
<font size=+1><b>
Managing distributed data
</b></font>
<br> &nbsp; &nbsp; &nbsp;
<font size=-1>
Using disk space on participant hosts
</font>
<ul>
<li> <a href=get_file_list.php>Uploading file lists</a>
<li> <a href=get_file.php>Uploading files</a>
<li> <a href=send_file.php>Downloading files</a>
<li> <a href=delete_file.php>Deleting files</a>
</ul>
<font size=+1><b>
Compiling BOINC software
</b></font>
@ -95,7 +81,8 @@ The components of a BOINC project, and how to create them.
<li> <a href=make_project.php>The make_project script</a>
<li> <a href=tool_start.php>Project control scripts</a>
<li> <a href=tool_xadd.php>Adding applications/platforms</a>
<li> <a href=tool_update_versions.php>Adding versions</a>
<li> <a href=code_signing.php>Code signing</a>
<li> <a href=tool_update_versions.php>Adding application versions</a>
<li> <a href=tool_upgrade.php>Upgrading a project's server software</a>
</ul>
@ -127,6 +114,21 @@ Tools for monitoring a BOINC project
<li> <a href=stripchart.php>Stripcharts: a tool for viewing time-varying data </a>
<li> <a href=stripchart_data.php>Recording data for Stripcharts</a>
</ul>
<font size=+1><b>
Managing distributed data
</b></font>
<br> &nbsp; &nbsp; &nbsp;
<font size=-1>
Using disk space on participant hosts
</font>
<ul>
<li> <a href=get_file_list.php>Uploading file lists</a>
<li> <a href=get_file.php>Uploading files</a>
<li> <a href=send_file.php>Downloading files</a>
<li> <a href=delete_file.php>Deleting files</a>
</ul>
";
page_tail();
?>

View File

@ -6,6 +6,7 @@ echo "
<ul>
<li> <a href=intro_user.php>Getting started</a>
<li> <a href=projects.php>Choosing projects</a>
<li> <a href=info.php>Usage rules and privacy policy</a>
<li> <a href=host_requirements.php>System requirements</a>
<li> <a href=account.php>Joining a project</a>
<li> Installing and running the BOINC client

View File

@ -32,7 +32,15 @@ The prefix name and extensions .gz, .exe, .sit are ignored.
Platform strings must match the names of platforms in the database.
<p>
TO DO: check for code signature files.
If a file of the form
<pre>
EXEC_FILENAME.sig
</pre>
is found, its contents will be used as a digital signature
for the corresponding file.
Recommended code-signing practices are described
<a href=code_signing.php>here</a>.
<h3>Multiple-file application versions</h3>