Commit Graph

5861 Commits

Author SHA1 Message Date
lfield ac7ac3721d
Merge pull request #1878 from smoe/patch-2
SCHED_BATCH -> SCHED_IDLE
2018-10-19 22:25:26 +01:00
David Anderson 388dcea7fe
Merge pull request #2713 from JuhaSointusalo/client-gpu-detection
client: fixes for launching GPU detection
2018-09-26 00:41:51 -07:00
Juha Sointusalo e77dd4c690 client: reduce log spamming in GPU detection 2018-09-25 22:24:02 +03:00
Juha Sointusalo 1296c86f49 client: remove unnecessary chdir() calls in GPU detection
GPU detection code goes back and forth between program and data
directories but this is unnecessary because run_program() already takes
care of running the program in correct directory.

Fixes two "ignoring return value" warnings from GCC/GLIBC.
2018-09-22 18:28:43 +03:00
Juha Sointusalo 21070861ec client: decode error codes in detecting GPUs
On Unixes, if GPU detection fails the client logs an error message
containing a raw value from waitpid() call. This raw value generally
requires writing an external program to decode it before it is useful
for troubleshooting.

Decode the raw value to something more useful to humans. Make a similar
change to Windows code too.
2018-09-22 18:20:45 +03:00
Juha Sointusalo c4708d24de client: use full path to client executable in GPU detection
GPU detection tries to launch a copy of the client using argv[0] but
argv[0] doesn't always include path. If path is not included and current
directory is not the same as BOINC program directory then the GPU
detection fails.

Use full path to the client executable instead if possible. Quote the
path on Windows to handle paths with spaces.
2018-09-22 17:55:04 +03:00
Juha Sointusalo 273df8fb55 client: fix GPU detection with --detach_console
GPU detection launches a copy of the client based on the contents of
argv[0]. If argv[0] doesn't include path to the client and the current
directory is not BOINC program directory then the GPU detection fails.
Hard coding the client name in --detach_console code only works because
of the extra work CreateProcess() does to find the executable. Launching
GPU detection uses CreateProcess() in a way that it doesn't try to find
the executable.

Fix this by using the full path to the client executable in
--detach_console code. This in turn makes the full path available to GPU
detection code. This also takes care of the case of the client
executable not being named boinc.exe.
2018-09-22 17:36:19 +03:00
David Anderson 0a200b2dbf
Merge pull request #2697 from AenBleidd/verify_chunk_improvements
[client] Verify chunk improvements
2018-09-20 00:37:53 -07:00
Tay Ray Chuan d111209f35
client/ASYNC_VERIFY::verify_chunk: check ferror() after a fread()/fwrite() 2018-09-19 17:47:20 +03:00
Tay Ray Chuan fccd486413
client/ASYNC_VERIFY::verify_chunk: delay casting of size_t to int
We only need ints when calling md5_append(), so do the casting at
call-time. This reduces the number of casts needed, as well as silences
a compiler warning on VS 2005.

We need not worry about integer overflows, as md5_append checks if the
int argument is negative.
2018-09-19 17:39:00 +03:00
Keith Uplinger dc32c03dd9 Change strcpy to use the safe_strcpy and strcat to use safe_strcat in acct_setup.cpp, hostinfo_unix.cpp and hostinfo_unix_test.cpp 2018-09-17 12:14:34 -05:00
Kevin Reed 5a42f595cb
Merge pull request #2680 from brevilo/fix-android-build-scripts
Fix android build scripts
2018-09-11 12:24:14 -05:00
brevilo 6558370ef0
Merge pull request #2670 from armstrdj/security_fixes_buffer_overflow
security updates for potential buffer overflows
2018-09-07 13:03:01 +02:00
Kevin Reed 0f24ab0953
Merge pull request #2677 from BOINC/dpa_am_names
client: parse and store user and team name from account manager.
2018-09-05 09:28:36 -05:00
David Anderson 2ff0e7ef21 Fix bug where AM user/team names weren't being escaped in XML files 2018-09-04 16:14:01 -07:00
Oliver Behnke 802225c7e4 Raised minimum Android requirement to KitKat 4.4.4 (API level 19)
* Relevant for 32 bit builds only
* Provides sys/statvfs.h
* Provides sys/swap.h (no more patch required)
2018-09-04 12:40:09 +00:00
David Anderson d7832866d3 client: parse and store user and team name from account manager.
If the AM is "dynamic", show those for projects attached via AM,
rather than e.g. "Science United user 123456".
2018-08-30 13:45:30 -07:00
Jonathan Armstrong 892d1d97e4 security updates for potential buffer overflows 2018-08-29 08:49:54 -05:00
Juha Sointusalo 6cfd88b521
Fix memory allocation during multhithreading
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-08-18 02:22:06 +03:00
Vitalii Koshura 434e061746
Fix missed indexer when make CreateThread request
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-08-17 01:33:47 +03:00
Vitalii Koshura c1379a9aa8
Fix linux build
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-08-16 02:19:29 +03:00
Vitalii Koshura 753b52d011
Fix cs_benchmark.cpp heap destruction
Use std::vector instead of allocated piece of memory to store multiple objects.
This hopefully fixes crash originally described in #2646 with heap destruction while copying data and next stacktrace:

>	msvcr100d.dll!_CrtDbgBreak()  Line 85	C
 	msvcr100d.dll!_VCrtDbgReportW(int nRptType, const wchar_t * szFile, int nLine, const wchar_t * szModule, const wchar_t * szFormat, char * arglist)  Line 502	C
 	msvcr100d.dll!_CrtDbgReportWV(int nRptType, const wchar_t * szFile, int nLine, const wchar_t * szModule, const wchar_t * szFormat, char * arglist)  Line 242	C++
 	msvcr100d.dll!_CrtDbgReportW(int nRptType, const wchar_t * szFile, int nLine, const wchar_t * szModule, const wchar_t * szFormat, ...)  Line 258 + 0x2c bytes	C++
 	msvcp100d.dll!std::_Debug_message(const wchar_t * message, const wchar_t * file, unsigned int line)  Line 13 + 0x22 bytes	C++
 	boinc.exe!std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > >::_Compat(const std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > > & _Right)  Line 239	C++
 	boinc.exe!std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > >::operator==(const std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > > & _Right)  Line 203	C++
 	boinc.exe!std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > >::operator!=(const std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > > & _Right)  Line 208 + 0xf bytes	C++
 	boinc.exe!std::vector<WSL,std::allocator<WSL> >::erase(std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > > * _First_arg, std::_Vector_const_iterator<std::_Vector_val<WSL,std::allocator<WSL> > > * _Last_arg)  Line 1194 + 0xf bytes	C++
 	boinc.exe!std::vector<WSL,std::allocator<WSL> >::clear()  Line 1218 + 0xe1 bytes	C++
 	boinc.exe!std::vector<WSL,std::allocator<WSL> >::operator=(const std::vector<WSL,std::allocator<WSL> > & _Right)  Line 715 + 0xa bytes	C++
 	boinc.exe!WSLS::operator=(const WSLS & __that)  + 0x32 bytes	C++
 	boinc.exe!HOST_INFO::operator=(const HOST_INFO & __that)  + 0x458 bytes	C++
 	boinc.exe!cpu_benchmarks(BENCHMARK_DESC * bdp)  Line 219	C++
 	boinc.exe!win_cpu_benchmarks(void * p)  Line 234	C++
 	kernel32.dll!00000000779d59cd()
 	[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
 	ntdll.dll!0000000077b0a561()

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-08-16 01:59:36 +03:00
Kevin Reed 0bd858759e
Merge pull request #2629 from BOINC/dpa_warnings
Remove VS2010 compiler warnings.  A few remain.
2018-08-14 17:18:42 -05:00
Charlie Fenton 064d0e80fc client: use #define DEFAULT_VERSION_CHECK_URL instead of NVC_CONFIG::get_default_version_check_url() 2018-08-02 20:23:41 -07:00
David Anderson c1bdf2b673 Remove VS2010 compiler warnings. A few remain. 2018-08-02 12:18:15 -07:00
Charlie Fenton 8bab12f8f8 client: save a copy of nvc_config.client_version_check_url in client_state.xml file, eliminating need for installer to rename previous nvc_config.xml to old_nvc_config.xml.
newer_version_startup_check() compares gstate.client_version_check_url to nvc_config.client_version_check_url. If different, it clears gstate.newer_version and updates gstate.client_version_check_url.
2018-07-26 02:09:48 -07:00
Kevin Reed eee34216d4
Merge pull request #2603 from BOINC/caf_New_version_check_config
Add support for new nvc_config.xml file for branded installers
2018-07-20 13:51:09 -05:00
Charlie Fenton d2c659eb82 Fix build break on MS Windows 2018-07-19 00:47:38 -07:00
Charlie Fenton b1e629a5fb Move network_test_url tag from cc_config.xml into new nvc_config.xml file, since WCG modifies this for their branded builds (along with new version check info) and it is probably never modified for standard (unbranded) BOINC 2018-07-18 19:10:30 -07:00
Charlie Fenton 0e7c376406 Silently skip tags client_version_check_url, client_download_url and client_new_version_text in cc_config.xml if an older client has written them there.
The Manager dialogs Event Log options and Exclusive Applications write the entire set of tags, so these tags typically contained the default values.
2018-07-15 18:53:25 -07:00
Charlie Fenton fc02420dd4 To allow customized new version message to be translatable, allow only the branded name of BOINC to be customized in the message.
Emphasize this difference by changing NVC_CONFIG struct member new_version_text to new_version_name.
Fix a bug I introduced in release_brand.sh script.
2018-07-15 03:24:59 -07:00
Charlie Fenton a03075c73c If version check URL has changed, reset any past new version information
This may happen due to installing a build of BOINC with different branding than before
2018-07-15 02:20:50 -07:00
Charlie Fenton 4f09c1979b Move client_version_check_url, client_download_url and client_new_version_text tags from cc_config.xml into new nvc_config.xml file.
If nvc_config.cml file is absent, use default values.
Branded installers can create or replace this file to customize these values.
Standard (unbranded) BOINC installers should either delete the file or create or replace it with one containing default values.
2018-07-14 04:59:06 -07:00
Charlie Fenton 7ea4a81865 Mac: Consolidate branding strings in one source file and one header file shared among all files which use them; add checks for missing branding strings. 2018-07-11 03:59:34 -07:00
RichardHaselgrove f25b5057c2 Fixes for WSL subsystem
set client state option on re-read
disable anonymous platform wsl plan classes when wsl not permitted
2018-06-29 17:36:05 +01:00
Vitalii Koshura 77b1f34d31
[Client] [WSL] Fix xml output
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-06-27 01:25:38 +03:00
Vitalii Koshura ba1c187445
[Client] [WSL] Add missed CloseHandle()
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-06-24 20:15:28 +03:00
Vitalii Koshura f8f6443074
[Client] [WSL] Extend detection.
Move WSL detection to get_host_info().
Enumerate available WSLs from registry.
Add wslapi library loading.
Add support of multiple installed wsl distros detection.
Detect only installed and configured distros.
Add extra information parse.
Add wslinfo files to save and parse wsl info.
Add dont_use_wsl param to cc_config.
Add missed hostinfo_wsl.cpp when building win client using gcc.
Fix small issues.
Small refactoring.

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-06-24 03:08:11 +03:00
lfield b9220b5e29
Merge pull request #2463 from JuhaSointusalo/client-remove-dev-input-idle
client: remove /dev/input/ based idle detection
2018-06-12 14:33:22 +02:00
David Anderson 777c25b7e6
Merge pull request #2491 from AenBleidd/wsl_detect
WSL detect initial implementation
2018-05-31 14:06:10 -07:00
Vitalii Koshura ea423788f1
Update copyright year
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-05-27 22:58:23 +03:00
Vitalii Koshura 5fc5fe4da5
Update hostinfo_unix_test.cpp file
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-05-27 22:14:30 +03:00
Vitalii Koshura 19a13d1e80
Move common linux detection functions to separate file.
Move WSL detection functions to separate file.
Update projet files for Windows, linux and MacOS

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-05-27 20:06:16 +03:00
David Anderson 0b9826c023 client: show error message if login token lookup fails
Also change lookup token RPC to work better with AMs.
But client fixes are required to make it work completely right,
which will have to wait until 7.12.
2018-05-20 13:55:40 -07:00
David Anderson 2aff54c2c0 Bug fixes for auto-attach
- token lookup RPC returned wrong tag
- client failed to record AM name
2018-05-18 21:12:50 -07:00
Vitalii Koshura 44164f3cc0
Fix copyright symbol
This fxes #2493

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-04-30 23:29:15 +03:00
Vitalii Koshura 197004ce29
Clean-up
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-04-29 16:52:45 +03:00
Vitalii Koshura e8f9ea7113
Add wsl info output
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-04-29 13:28:50 +03:00
Vitalii Koshura 87eb6d4459
Make wsl_parse work
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-04-29 00:04:03 +03:00
Vitalii Koshura c23eb6a230
Implement wsl_parse_info
Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2018-04-28 09:38:59 +03:00