From 67bddbea912f5d2ee941f4cc9aa93f96b7f40d8a Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 14 Aug 2006 17:04:57 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=10906 --- checkin_notes | 17 ++++++++++++++++- doc/groups.php | 18 +++++++++++++++--- html/inc/util.inc | 1 + lib/gui_rpc_client.h | 2 ++ lib/gui_rpc_client_ops.C | 26 ++++++++++++++++++++++++++ 5 files changed, 60 insertions(+), 4 deletions(-) diff --git a/checkin_notes b/checkin_notes index 649490b36f..223278cece 100755 --- a/checkin_notes +++ b/checkin_notes @@ -8737,7 +8737,7 @@ Rom 13 Aug 2006 lib/ diagnostics_win.C -David 11 Aug 2006 +David 13 Aug 2006 - User web: multi-column option for displaying venue-specific prefs - User web: value-checking on prefs (from Christian Beer) @@ -8764,3 +8764,18 @@ David 11 Aug 2006 prefs_edit_form.php (removed) prefs_remove.php white.css + +David 14 Aug 2006 + - GUI RPC: added new RPCs + get_global_prefs_override_struct(GLOBAL_PREFS&) and + set_global_prefs_override_struct(GLOBAL_PREFS&) + + Note: these are useful only when ALL prefs are being + specified in the override file, + as there's no provision for "undefined" values in the structs. + + html/inc/ + util.inc + lib/ + gui_rpc_client.h + gui_rpc_client_ops.C diff --git a/doc/groups.php b/doc/groups.php index ead9e78e08..bc0ef59d28 100644 --- a/doc/groups.php +++ b/doc/groups.php @@ -25,11 +25,11 @@ won't be able to delete the files there.

Edit /etc/group so that apache belongs to group boinc, i.e. the line:

-    boinc:x:566:
+boinc:x:566:
 
becomes:
-    boinc:x:566:apache
+boinc:x:566:apache
 
(Apache will need to be stopped/restarted for this to take effect.)

@@ -39,10 +39,22 @@ the critical directories are owned by boincadm and have the set-GID bit set; this means that any directories or files created by apache in those directories will have group boinc (not group apache). -Also, the BOINC software makes all directories group read/write. +The BOINC software makes all directories group read/write. Thus, both apache and boinc will have read/write access to all directories and files, but other users will have no access. +

+On an existing project, do: +

+chmod 02770 upload
+chmod 02770 html/cache
+chmod 02770 html/inc
+chmod 02770 html/languages
+chmod 02770 html/languages/compiled
+chmod 02770 html/user_profiles
+
+You may also need to change the ownership of these directories +and all their subdirectories to boincadm/boinc.

If you're running several projects on the same server and diff --git a/html/inc/util.inc b/html/inc/util.inc index 17fa081557..c5e588fbcb 100644 --- a/html/inc/util.inc +++ b/html/inc/util.inc @@ -588,6 +588,7 @@ function link_with_GET_variables($text, $baseurl, $variable_name, $variable_valu // @param double $low the lowest number of value if verified // @param double $high the highest number of value if verified // @return bool true if $value is numeric and within the defined borders, false if $value is not numeric, no changes were made in this case +// function verify_numeric(&$value, $low, $high = false) { $number = trim($value); $number = str_replace('o', '0', $number); diff --git a/lib/gui_rpc_client.h b/lib/gui_rpc_client.h index f7d1a95065..ef8e62b8ae 100644 --- a/lib/gui_rpc_client.h +++ b/lib/gui_rpc_client.h @@ -619,6 +619,8 @@ public: int get_cc_status(CC_STATUS&); int get_global_prefs_override(std::string&); int set_global_prefs_override(std::string&); + int get_global_prefs_override_struct(GLOBAL_PREFS&); + int set_global_prefs_override_struct(GLOBAL_PREFS&); }; struct RPC { diff --git a/lib/gui_rpc_client_ops.C b/lib/gui_rpc_client_ops.C index fd7d02ca67..b0f0eb0c45 100644 --- a/lib/gui_rpc_client_ops.C +++ b/lib/gui_rpc_client_ops.C @@ -2006,4 +2006,30 @@ int RPC_CLIENT::set_global_prefs_override(string& s) { return retval; } +int RPC_CLIENT::get_global_prefs_override_struct(GLOBAL_PREFS& prefs) { + int retval; + string s; + MIOFILE mf; + char buf[64000]; + bool found_venue; + + retval = get_global_prefs_override(s); + if (retval) return retval; + strcpy(buf, s.c_str()); + mf.init_buf(buf); + prefs.parse(mf, "", found_venue); + return 0; +} + +int RPC_CLIENT::set_global_prefs_override_struct(GLOBAL_PREFS& prefs) { + char buf[64000]; + MIOFILE mf; + string s; + + mf.init_buf(buf); + prefs.write(mf); + s = buf; + return set_global_prefs_override(s); +} + const char *BOINC_RCSID_90e8b8d168="$Id$";