summaryrefslogtreecommitdiff
path: root/lib/server
Commit message (Collapse)AuthorAge
* Add support for OpenSSL 1.1 and replace deprecated function callsChris Wilson2018-01-01
| | | | | | | | | | | | | | | | | | | | | | | See https://github.com/boxbackup/boxbackup/issues/16 for details. Thanks to Chris West @FauxFaux for the initial patch! Use OpenSSL 1.1.0g for Windows superbuild. Fix Windows build by removing calls to obsolete do_ms.bat <https://stackoverflow.com/questions/39076244/why-there-is-no-ms-do-ms-bat-after-perl-configure-vc-win64a/39247560#39247560>. Workaround for incorrect library suffixes searched by FindOpenSSL <https://gitlab.kitware.com/cmake/cmake/issues/17604>. Link OpenSSL statically and fix missing dependency on crypt32.lib. (cherry picked from commit edd3687f067c68b131822e0064cdeff5bf7a3835) (cherry picked from commit b003e009d1fccadf55a0f59a01c66f7b80f9b3e5) (cherry picked from commit cc6e20466b857f7e20d816a2c20cb36f112398ab) (cherry picked from commit 303c6405e3bc1e673dbc691792e0633742c01f4e) (cherry picked from commit 4e24006f75142a254f1a7db76cf9da1e752d9283) (cherry picked from commit 448ac48a89538f67f508f8d21931c5e6e90472c0) (cherry picked from commit 00b3bb0697219ef8c742698dd43d53b538e362b1)
* Update platform feature detection to work with CMake.Chris Wilson2016-09-03
| | | | | | | Rewrite some macros in forms that can be parsed by our parser written in CMake language (fake m4 with regexps). Fix incorrect conditional includes and incorrect #if/#ifdef assumptions.
* Properly initialise pBytesTransferred before WaitForOverlappedOperation returns.Chris Wilson2015-12-24
| | | | | Returning an uninitialised value was causing copying of random amounts of data in bbackupd on command socket disconnect, and crashes.
* We need to include IOStreamGetLine.h on Unix as well as on Windows.Chris Wilson2015-12-24
|
* Add a version of KillServer that takes a pid_file, and reads the PID from it.Chris Wilson2015-12-24
|
* Don't use close() to close a Winsock socket.Chris Wilson2015-12-22
| | | | | We should always use closesocket() instead, which the Close() method already does, so just call it instead.
* Remove non-standard BSD u_int* types.Chris Wilson2015-12-08
| | | | | | | MSVC doesn't like them, and they're not necessary now that we have stdint.h. Remove some compatibility typedefs from BoxPlatform.h and emu.h which are not needed any longer either.
* Handle generic exceptions by returning an Error message with correct Type.Chris Wilson2015-08-06
|
* Fix return types for integer function to be integersChris Wilson2015-08-06
|
* Shorten minimum sleep while waiting for test daemons to dieChris Wilson2015-08-06
|
* Fix ServerStream logging too many messages when waiting for a child to die.Chris Wilson2015-07-31
| | | | Detect that there are no remaining children to wait for, and return quietly.
* Refactor to allow sharing code for starting and stopping daemons in tests.Chris Wilson2015-07-31
| | | | | The new StartDaemon() and StopDaemon() in ServerControl.cpp/h are generic, and used by StartClient() and StartServer() in StoreTestUtils.cpp/h.
* Refactor to allow non-bbstored store configurations.Chris Wilson2015-06-28
| | | | | | Make some keys not required in BackupDaemonConfigVerify, and verify them afterwards instead, when the rest of the configuration file has been read (and in future, the store type would be known.)
* Add command-line help to test executables.Chris Wilson2015-06-10
|
* Define BOX_SOCKET_ERROR_MESSAGE, replace more BOX_LOG_SOCKET_ERROR calls ↵Chris Wilson2015-04-15
| | | | with it.
* Use THROW_EXCEPTION_MESSAGE macro to save a message in exceptions.Chris Wilson2015-04-15
|
* Whitespace and semicolon-after-macro fixes.Chris Wilson2015-04-06
|
* Fix overlapped I/O in WinNamedPipeStream.Chris Wilson2014-12-28
| | | | Broken by previous changes to introduce overlapped I/O for writes.
* Whitespace and comment fixes.Chris Wilson2014-12-28
| | | | Improve correctness and reduce code duplication in bbackupctl.
* Improve debugging of named pipe operations and bbackupctl pipe interaction.Chris Wilson2014-12-28
|
* Add missing timeouts on command socket writes.Chris Wilson2014-12-28
|
* Add comment about reason for code duplication.Chris Wilson2014-12-26
| | | | | The mysterious case of the missing Write(const std::string&) in the night-time, or rather in subclasses of IOStream which declares it.
* Add support for timeouts on named pipe writes, using overlapped I/O.Chris Wilson2014-12-26
|
* Fix warning about HAVE_RANDOM_DEVICE not being defined.Chris Wilson2014-12-26
|
* Replace sprintf() with snprintf(), fixes compile warnings on OpenBSD.Chris Wilson2014-12-22
| | | | | And compile errors on recent MinGW.
* Fix compile error on OpenBSD due to invalid forward declarations of classes.Chris Wilson2014-12-22
| | | | | OpenBSD's compiler appears to be more sensitive than others.
* Allow writing a std::string to any SocketStream.Chris Wilson2014-12-21
|
* Improve comment explaining SocketStream::PollTimeout function.Chris Wilson2014-12-21
|
* Add a note about units of arguments to PollTimeout function().Chris Wilson2014-12-15
| | | | | Because they're not obvious and I wasted time trying to figure them out.
* Fix stupid typo on struct member names.Chris Wilson2014-12-06
|
* Add support for getsockopt(SO_PEERCRED) on OpenBSD 5.2.Chris Wilson2014-12-06
| | | | | | | | | | | OpenBSD requires different headers to be included, including a bug which makes it essential to include sys/param.h before sys/ucred.h, and gives the fields of struct ucred different names than Linux does. This fixes compilation on OpenBSD and allows the user connecting to a UNIX socket to be checked, increasing security of the command socket on this platform.
* Generate configure script in qdbm directory.Chris Wilson2014-12-01
| | | | | | Now that we've removed it from version control, we need to build it from configure.in as part of bootstrapping Box Backup.
* Fix exception in bbackupd when no LogFile is configured.Chris Wilson2014-11-23
|
* Fix compile errors on Windows, thanks to Kai Liebenau for the patch.Chris Wilson2014-11-16
|
* Add option to truncate log file at start of every backup.Chris Wilson2014-11-16
| | | | Prevents backup log files from becoming too large.
* Refactor handling of exceptions in protocol server command executors.Chris Wilson2014-10-31
| | | | | | | | | | Add a standard method to Replyable that will be called if a recoverable exception (a BoxException) occurs, and can return a protocol Message to be sent to the client, such as an error code for various standard errors, or rethrow the exception. If you want something different, catch exceptions and return the desired reply yourself, or you'll get the default handling.
* optlen could become bigger than sizeof(info) in future and that's OKChris Wilson2014-09-18
|
* Add check for trying to ReceiveStream when no stream availableChris Wilson2014-09-18
|
* Update comment to match current method nameChris Wilson2014-09-18
|
* Whitespace fixesChris Wilson2014-09-18
|
* Improve exception message if a Daemon is used without being configured firstChris Wilson2014-09-18
|
* Catch exceptions while executing store commands, and return an error message.Chris Wilson2014-09-04
| | | | | | | | | This will allow the client to eventually have more information about what went wrong on the server, if the server admin agrees, and makes test debugging easier. Backport some additional testbackupstore tests from the test refactor branch. Merged back changes from the test refactor branch to reduce diffs.
* Changed many uses of BackupProtocolClient to BackupProtocolCallable.Chris Wilson2014-09-04
| | | | | | Makes way for more use of local protocol objects and protocol subclasses. Merged back changes from the test refactor branch to reduce diffs.
* Simplify code with macros, update comments and fix whitespace.Chris Wilson2014-09-04
| | | | | | Hopefully all of these changes are inconsequential. Merged back changes from the test refactor branch to reduce diffs.
* Fix poll timeout calculation for infinite timeouts.Chris Wilson2014-08-15
|
* Whitespace fixes.Chris Wilson2014-08-15
|
* Add missing timeouts for network operations.Chris Wilson2014-08-15
|
* Fix deadlock waiting for read or write on closed connection.Chris Wilson2014-08-15
| | | | | | | | If the system is suspended then it may not realise that a TCP connection has been closed, while waiting for data to arrive on it. We didn't used to apply a timeout to this read operation. Now we use the connection's default timeout on all read and write operations. Network operations that don't pass a timeout will be logged with a backtrace, so that they can be fixed.
* Remove ServerException.h and the exception code aliases that it defines.Chris Wilson2014-08-15
| | | | We don't really need these, so clean up by removing them.
* Whitespace, wrapping, comments and dead code cleanups.Chris Wilson2014-08-15
| | | | | | | | Conflicts: bin/bbackupd/BackupDaemon.cpp bin/bbackupd/BackupDaemon.h test/bbackupd/testbbackupd.cpp