Commit Graph

2983 Commits

Author SHA1 Message Date
David Anderson 6c58c5b3f5 tweak, no functional change 2016-06-29 13:05:12 -07:00
David Anderson 28687f6d46 lib: add an include to crypt.cpp that may fix openssl 1.1 compile problem 2016-06-26 22:59:57 -07:00
David Anderson b0b5edc0bd Unix: if file locking is not supported on the FS, skip it rather than failing 2016-06-24 10:59:41 -07:00
Rom Walton a998eeb0ed Android: Android's standalone toolchain now includes a 'sys/shm.h' header file but does not the old-style shared memory segments.
Our Android port uses memory mapped files anyway, so just skip over it and get on with life.
2016-06-19 16:08:33 -07:00
Rom Walton 9dad26fefb VBOX: Take a screen shot on failure and dump the base64 encoded image to stderr.
Report the MD5 signature in the stderr output as well so that duplicate screen shots can be quickly identified.  Of course this assumes that the exact same PNG is generated across different machine types and video cards.  Currently I believe that it should given the hardware in question is virtualized.
2016-06-12 19:20:55 -07:00
Christian Beer c006e8d96a Merge pull request #1537 from BOINC/message-tweak
Lib: tweak error messages
2016-05-23 15:56:21 +02:00
Laurence Field b4becd9fcc Added error codes
Added three error codes for use with the file completion trigger file mechanism of the vboxwrapper.
2016-05-03 11:32:05 +02:00
Christian Beer 65285574c1 Lib: tweak error messages
The snprintf() was moved one up because it can change errno before calling perror(). This way the correct error message is printed if getaddrinfo() fails and both functions (perror () and gai_strerror()) are thread-safe.
2016-05-02 11:20:00 +02:00
Christian Beer 9d05f5e6ad Lib: tweak error messages
As described in PR#1531 the original error message does not provide enough information. This also fixes that no unrelated error message is shown.
2016-05-02 09:09:57 +02:00
Christian Beer 6c06bfc390 Merge pull request #1525 from aaronpuchert/fix_reallocation
Prevent memory leak on reallocation failure
2016-04-27 14:27:34 +02:00
Aaron Puchert e2c7b61d33 Remark about strong exception safety of strcatdup
This is as good as it gets.
2016-04-26 22:38:11 +02:00
David Anderson 2581ac688d Add <no_opencl/> option in cc_config.xml 2016-04-23 20:47:31 -07:00
Aaron Puchert 4aa4a67450 Prevent memory leak on reallocation failure 2016-04-13 01:05:33 +02:00
David Anderson e917f0e047 client: message tweak 2016-04-06 01:20:32 -07:00
David Anderson 1fe02c9d4f GUI RPC: enclose message bodies in CDATA to avoid XML parse errors
for messages containing "<".

Also strip off <?xml tag from project config
to make GUI RPC reply valid.
2016-04-05 13:14:21 -07:00
David Anderson 36dcf816c5 Merge branch 'master' of https://github.com/BOINC/boinc 2016-04-05 12:18:15 -07:00
Artem Vorotnikov 7a6b5ee204 Work around invalid XML in logs
Ironically, should the user specify invalid XML tag in cc_config.xml, BOINC will write log message containing that tag unescaped and unclosed. Needless to say, it breaks XML parsing instantly. This patch auto-closes this tag in the log message.
2016-03-23 15:26:52 +03:00
David Anderson ace53809a9 lib: fix Coverity warning 2016-02-20 10:16:35 -08:00
Rom Walton 8caf563e59 lib: Fix XML typos recently introduced during name change 2016-02-19 19:06:26 -05:00
Rom Walton 9542bc9b1b client & MGR: Unify the language around the setup cookie feature. 2016-02-19 10:40:49 -05:00
Rom Walton da9149ab80 lib: Add missing declarations for Windows 2016-02-19 10:34:08 -05:00
David Anderson b3d3fc4f89 snprintf() workaround for Win
VS 2010 doesn't have snprintf().
As a temporary workaround (until we move to VS 2015)
#define snprintf as _snprintf (which doesn't null-terminate
if buffer is too small).
This is at least no worse than using sprintf(), which we were doing.
2016-02-17 23:22:49 -08:00
David Anderson 87769d4acb Merge branch 'master' of github.com:BOINC/boinc
Conflicts:
	clientgui/sg_TaskPanel.cpp
2016-02-17 22:55:57 -08:00
David Anderson 1587dbf71a change some sprintf() to snprintf() in lib code 2016-02-17 22:53:37 -08:00
Rom Walton c3308339b5 lib: fix typo 2016-02-17 19:01:18 -05:00
Rom Walton 90d23b72d8 lib: Cleanup low hanging fruit with regards to cleaning up sprintf.
Use snprintf instead.
2016-02-17 18:50:28 -05:00
Rom Walton 41331be431 lib: Remove test/dead code
Apparently test/dead code gets flagged during a security audit as needing to be removed.  I suppose it is assumed that everyone has switched over to using unit tests.
2016-02-16 22:00:24 -05:00
Rom Walton a44f7ad49d LIB: Revert back the changes to mfile.cpp.
It introduced null characters into the state file stream which we do not want.
2016-02-16 10:04:24 -05:00
Rom Walton 2997944822 client: Let strlcat handle dealing with the buffer size and suppress the security warnings again. 2016-02-16 08:48:08 -05:00
Rom Walton dd1232ad63 lib: white space issues 2016-02-15 20:05:20 -05:00
Rom Walton 15adb9c438 LIB: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-15 19:48:38 -05:00
Rom Walton 00edb91b2c LIB: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-15 19:18:22 -05:00
Rom Walton e0ed4c1a14 * LIB: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-15 19:09:39 -05:00
Rom Walton 41e78d35da LIB: Add missing header 2016-02-15 18:01:31 -05:00
Rom Walton 16e51ec218 LIB: Cleanup low hanging fruit with regards to cleaning up strcpy and strcat use.
Use safe_strcpy and safe_strcat when dealing with non-pointer data types.
2016-02-15 17:54:13 -05:00
Rom Walton 2c9fd1af74 lib: indentation, initialization of double with int
(from: Steffen Moeller)
2016-02-14 00:29:56 -05:00
Rom Walton eab1dd6f84 MGR and client: Add more missing code from the cookieless install merge. 2016-02-10 17:37:52 -05:00
Rom Walton 4d2e6a041f MGR: Fix for converting std::string to wxString for Mac and Linux.
MGR: Add missing commit from previous merge for the cookieless install scenario.
2016-02-10 10:46:48 -05:00
Rom Walton a2f58bf7c8 lib: Fix build break 2016-02-09 07:55:22 -05:00
Rom Walton 6beafff693 WCG: New feature 'cookieless installs'
See: http://boinc.berkeley.edu/trac/wiki/SimpleAttach#CookielessInstalls

Signed-off-by: Rom Walton <romw@romwnet.org>
2016-02-08 15:51:33 -05:00
David Anderson d5f5918111 Replace strncpy() with strlcpy() various places.
Except for very specific cases, strncpy() should never be used.
It can result in a non-terminated string.

Also replace strncat() with strlcat(); the latter is simpler
because you don't have to calculate remaining buffer space.
2016-02-01 20:23:18 -08:00
David Anderson 3f2cd00b30 lib, Unix: remove chown/chmod stuff from boinc_copy().
boinc_copy() is used in both client and server.
The chown/chmod was added Jan 6 2009,
apparently to deal with a client problem.
More recently, error checking was added to the chown/chmod calls.
On the server (e.g. sample assimilator) these fail,
and boinc_copy() returns error (even though the file was actually copied).

1) let's not overload functions.  Functions in general should do 1 thing.
To this end, I moved the chown/chmod to a new function, boinc_copy_attributes().

2) It's not clear to me that we need the chown/chmod stuff,
either on client or server.
On the Unix client, we already have FILE_INFO::set_permissions(),
which sets the rwx bits of files copied into slot directories, as appropriate.
The chown() will be a no-op, since the client creates
both the original file (in project dir) and the copy.

So I'm not going to call boinc_copy_attributes() in the client.
Let's see if any problems arise in Unix with apps that
used <copy_file> for executables.
2016-01-30 13:48:06 -08:00
David Anderson 3758ae4ebc Use HTTPS also for network test URL, and for WCG custom URLs 2016-01-27 21:15:19 -08:00
David Anderson 6dd95cd7b9 Use HTTPS for version check and download page URLs.
Prevents MIML attacks; doesn't prevent hacked BOINC server.
Would need offline signing for that.
2016-01-27 21:08:11 -08:00
David Anderson 0b09759ee9 Fix build break with gcc 6; from Nicolas and Gianfranco 2016-01-21 18:21:50 -08:00
Rom Walton 8e3b69fa46 client: Adjust the peak flop estimate for Nvidia GPUs when detecting them with OpenCL. 2016-01-07 19:51:29 -05:00
Rom Walton 5fb370f651 client: Add compute capability detection for Nvidia OpenCL devices 2016-01-07 19:33:28 -05:00
Rom Walton 96664411ea client: Remove wavefront detection from AMD OpenCL code path, it isn't used to calculate GFLOPS. 2016-01-07 19:22:03 -05:00
Rom Walton d147f0aa35 client: add simd_instruction_width to the peak FLOPS calculation.
A small attempt at future proofing things.  The value is 1 on my new GPU, but might not be on higher end cards.  Docs implies it should be part of the calculation.
2016-01-07 11:44:35 -05:00
Rom Walton b9981d7a56 client: Properly calculate the peak FLOPS of new AMD GPU(s) that only support OpenCL.
Use AMD's vendor specific extension if it is available to calculate the total number of shaders and determine the peak FLOP rate from that.

My new GPU I got for Christmas was only reporting 30% of its peak FLOP rate and does not support CAL.
2016-01-07 01:01:51 -05:00