mirror of https://github.com/BOINC/boinc.git
add elements fo config file
svn path=/trunk/boinc/; revision=8550
This commit is contained in:
parent
258170dce3
commit
2306ba39ab
|
@ -12812,3 +12812,20 @@ Bruce 7 Oct 2005
|
|||
user/
|
||||
edit_passwd_action.php
|
||||
|
||||
David 7 Oct 2005
|
||||
- Add optional <min_passwd_length> element to config.xml.
|
||||
The change-password web pages get min passwd length from here.
|
||||
The get_project_config.php RPC gets it from here also.
|
||||
Default in both cases is 6.
|
||||
- Add optional <client_account_creation_disabled/> element to config.xml.
|
||||
This is to be used by projects that have not
|
||||
updated to version 5 server software yet
|
||||
(i.e. that don't have create_account.php,
|
||||
and the database updates that go along with it).
|
||||
As soon as all projects have upgraded we can get rid of this.
|
||||
|
||||
client/
|
||||
pers_file_xfer.C
|
||||
html/user/
|
||||
edit_passwd_action.php
|
||||
sample_get_project_config.php
|
||||
|
|
|
@ -258,8 +258,6 @@ bool PERS_FILE_XFER::poll() {
|
|||
//
|
||||
void PERS_FILE_XFER::check_giveup(const char* why) {
|
||||
if (fip->get_next_url(fip->upload_when_present) == NULL) {
|
||||
// the file has no appropriate download location
|
||||
// remove the file from the directory and delete the file xfer object
|
||||
gstate.file_xfers->remove(fxp);
|
||||
delete fxp;
|
||||
fxp = NULL;
|
||||
|
@ -299,13 +297,15 @@ void PERS_FILE_XFER::handle_xfer_failure() {
|
|||
}
|
||||
|
||||
if (fxp->file_xfer_retval == HTTP_STATUS_NOT_FOUND) {
|
||||
// If it is uploading and receives a HTTP_STATUS_NOT_FOUND then
|
||||
// the file upload handler could not be found.
|
||||
if (!fxp->is_upload) {
|
||||
check_giveup("file was not found on server");
|
||||
if (fxp->is_upload) {
|
||||
// If it is uploading and receives a HTTP_STATUS_NOT_FOUND then
|
||||
// the file upload handler could not be found.
|
||||
// This is hopefully transient.
|
||||
//
|
||||
retry_or_backoff();
|
||||
return;
|
||||
} else {
|
||||
retry_or_backoff();
|
||||
check_giveup("file was not found on server");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@ A config.xml file looks like this:
|
|||
<pre>",
|
||||
htmlspecialchars("
|
||||
<boinc>
|
||||
|
||||
<config>
|
||||
<host> project.hostname.ip </host>
|
||||
<db_name> databasename </db_name>
|
||||
|
@ -34,26 +33,28 @@ htmlspecialchars("
|
|||
<stripchart_cgi_url> http://A/URL </stripchart_cgi_url>
|
||||
<log_dir> /path/to/directory </log_dir>
|
||||
|
||||
[ <disable_account_creation/> ]
|
||||
[ <profile_screening/> ]
|
||||
[ <show_results/> ]
|
||||
[ <one_result_per_user_per_wu/> ]
|
||||
[ <max_wus_to_send> N </max_wus_to_send> ]
|
||||
[ <min_sendwork_interval> N </min_sendwork_interval> ]
|
||||
[ <daily_result_quota> N </daily_result_quota> ]
|
||||
[ <ignore_delay_bound/> ]
|
||||
[ <dont_generate_upload_certificates/> ]
|
||||
[ <locality_scheduling/> ]
|
||||
[ <locality_scheduling_wait_period> N </locality_scheduling_wait_period> ]
|
||||
[ <min_core_client_version> N </min_core_client_version ]
|
||||
[ <choose_download_url_by_timezone/> ]
|
||||
[ <cache_md5_info/> ]
|
||||
[ <disable_account_creation/> ]
|
||||
[ <profile_screening/> ]
|
||||
[ <show_results/> ]
|
||||
[ <one_result_per_user_per_wu/> ]
|
||||
[ <max_wus_to_send> N </max_wus_to_send> ]
|
||||
[ <min_sendwork_interval> N </min_sendwork_interval> ]
|
||||
[ <daily_result_quota> N </daily_result_quota> ]
|
||||
[ <ignore_delay_bound/> ]
|
||||
[ <dont_generate_upload_certificates/> ]
|
||||
[ <locality_scheduling/> ]
|
||||
[ <locality_scheduling_wait_period> N </locality_scheduling_wait_period> ]
|
||||
[ <min_core_client_version> N </min_core_client_version ]
|
||||
[ <choose_download_url_by_timezone/> ]
|
||||
[ <cache_md5_info/> ]
|
||||
[ <min_core_client_version_announced> N </min_core_client_version_announced> ]
|
||||
[ <min_core_client_upgrade_deadline> N </min_core_client_upgrade_deadline> ]
|
||||
[ <choose_download_url_by_timezone> N </choose_download_url_by_timezone> ]
|
||||
[ <cache_md5_info> N </cache_md5_info> ]
|
||||
[ <nowork_skip> N </nowork_skip> ]
|
||||
[ <sched_lockfile_dir> path </sched_lockfile_dir> ]
|
||||
[ <min_core_client_upgrade_deadline> N </min_core_client_upgrade_deadline> ]
|
||||
[ <choose_download_url_by_timezone> N </choose_download_url_by_timezone> ]
|
||||
[ <cache_md5_info> N </cache_md5_info> ]
|
||||
[ <nowork_skip> N </nowork_skip> ]
|
||||
[ <sched_lockfile_dir> path </sched_lockfile_dir> ]
|
||||
[ <min_passwd_length> N </min_passwd_length> ]
|
||||
[ <client_account_creation_disabled/> ]
|
||||
|
||||
|
||||
<!-- optional; defaults as indicated: -->
|
||||
|
@ -99,7 +100,10 @@ htmlspecialchars("
|
|||
|
||||
echo "<b>The general project configuration elements are:</b>";
|
||||
list_start();
|
||||
list_item("host", "name of project's main host, as given by Python's socket.hostname(). Daemons and tasks run on this host by default.");
|
||||
list_item("host",
|
||||
"name of project's main host, as given by Python's socket.hostname().
|
||||
Daemons and tasks run on this host by default."
|
||||
);
|
||||
list_item("db_name", "Database name");
|
||||
list_item("db_host", "Database host machine");
|
||||
list_item("db_user", "Database user name");
|
||||
|
@ -264,6 +268,17 @@ list_item("nowork_skip",
|
|||
preferences when users click on Update.
|
||||
Use it if your server DB is overloaded."
|
||||
);
|
||||
list_item("min_passwd_length",
|
||||
"Minimum length of user passwords. Default is 6."
|
||||
);
|
||||
list_item("client_account_creation_disabled",
|
||||
"If set, this project doesn't support the web RPCs for
|
||||
looking up and creating accounts.
|
||||
This is a temporary kludge as we transition from
|
||||
version 4 to version 5 software.
|
||||
It should be removed by 12/2005 or so."
|
||||
);
|
||||
|
||||
list_end();
|
||||
|
||||
// THE INFORMATION BELOW NEEDS TO BE ORGANIZED AND PUT INTO TABLES OR SOME OTHER LESS CRAMPED FORM
|
||||
|
|
|
@ -19,8 +19,16 @@ $passwd2 = stripslashes(post_str("passwd2"));
|
|||
if ($passwd != $passwd2) {
|
||||
error_page("New passwords are different");
|
||||
}
|
||||
if (strlen($passwd)<6) {
|
||||
error_page("New password is too short: minimum password length is 6 characters");
|
||||
|
||||
$config = get_config();
|
||||
$min_passwd_length = parse_config($config, "<min_passwd_length>");
|
||||
if (!$min_passwd_length) $min_passwd_length = 6;
|
||||
|
||||
if (strlen($passwd)<$min_passwd_length) {
|
||||
error_page(
|
||||
"New password is too short:
|
||||
minimum password length is $min_passwd_length characters."
|
||||
);
|
||||
}
|
||||
if ($auth) {
|
||||
$user = lookup_user_auth($auth);
|
||||
|
|
|
@ -6,17 +6,26 @@ require_once("../inc/xml.inc");
|
|||
xml_header();
|
||||
|
||||
$config = get_config();
|
||||
$name = parse_config($config, "<long_name>");
|
||||
$long_name = parse_config($config, "<long_name>");
|
||||
$min_passwd_length = parse_config($config, "<min_passwd_length>");
|
||||
if (!$min_passwd_length) {
|
||||
$min_passwd_length = 6;
|
||||
}
|
||||
$disable_account_creation = parse_bool($config, "disable_account_creation");
|
||||
$client_account_creation_disabled = parse_bool($config, "client_account_creation_disabled");
|
||||
|
||||
echo "<project_config>
|
||||
<name>$name</name>
|
||||
<name>$long_name</name>
|
||||
";
|
||||
|
||||
if (parse_bool($config, "disable_account_creation")) {
|
||||
if ($disable_account_creation) {
|
||||
echo " <account_creation_disabled/>\n";
|
||||
}
|
||||
if ($client_account_creation_disabled) {
|
||||
echo " <client_account_creation_disabled/>\n";
|
||||
}
|
||||
echo "
|
||||
<min_passwd_length>6</min_passwd_length>
|
||||
<min_passwd_length>$min_passwd_length</min_passwd_length>
|
||||
</project_config>
|
||||
";
|
||||
|
||||
|
|
Loading…
Reference in New Issue