aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2018-12-31modules: Fix compile issue with smb moduleHEADmasterAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-12-31modules: Disable Nagle's Algorithm (TCP_NODELAY) for sftpAndreas Schneider1-0/+11
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-12-31modules: Increase the libssh timeout to 20 secAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-12-31modules: Use new known_hosts API from libssh 0.8Andreas Schneider2-117/+119
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-12-31modules: Reformat sftp moduleAndreas Schneider1-784/+859
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-07-05ctest: Migrate to new dashboardAndreas Schneider1-2/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09sftp: Free hash memory and srv_pubkeyAndreas Schneider1-1/+2
2018-02-09sftp: Use new ssh_get_publickey_hash() functionAndreas Schneider1-3/+15
2018-02-09cmake: Check for newer libssh versionAndreas Schneider1-11/+11
2018-02-09cmake: Require cmake 3.0 at leastAndreas Schneider1-1/+1
2018-02-09Get rid of unnecessary goto statementsDavid Kahles1-6/+5
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09Don't double free the csync_stat_t struct when stat failsDavid Kahles1-1/+0
csync_vio_local_stat doesn't allocate buf, so it shouldn't fee it (it may be a buffer on the stack). If stat fails and -1 is returned, csync_ftw will free buf by itself, as it has also allocated it. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09Fix local file type detection for socketsDavid Kahles1-1/+1
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09Simplify local file type detection switch statementDavid Kahles1-10/+3
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09Remove case and just fall throughDavid Kahles1-2/+0
The two cases are exactly the same Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09Set last six characters to 'X', before trying to change temporary nameDavid Kahles1-0/+6
Otherwise c_tmpname would fail, when the first temporary file name already exists. Thus, csync would give up on this file instead of trying a different file names. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09log: Use unlikely macroDavid Kahles1-1/+2
It's very unlikely that the error code is unknown. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09sftp: Use more descriptive error messagesDavid Kahles1-6/+6
Tell the user what exactly failed, so he might be able to identify the problem. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09sftp: Use the thread-safe c_strerror_r instead of strerrorDavid Kahles1-14/+16
Note: On windows strerror_r is no avaible and is emulated in a thread-unsafe way. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09Check whether max time difference and recursion depth get setDavid Kahles1-0/+2
Set the values to a non-standard value in the test before loading the config file, and check whether they got set correctly. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09Delete directory name after using itDavid Kahles1-1/+1
On Windows or with iconv, the string would have been deleted before we create the directory. Though the mkdir() function would fail. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09config: Use the correct part of the string to parse the integerDavid Kahles1-5/+7
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09log: Make sure we use the XSI compliant strerror_r functionDavid Kahles12-48/+150
We have defined _GNU_SOURCE all over the code to get the GNU specific asprintf, but this makes a GNU specific strerror_r function avaible, wich is incompatible with the expected XSI compliant verions. Defining _GNU_SOURCE only for stdio.h and undefining afterwars is very hard, because stdio.h is also included by many other headerfiles, so we would need to make sure, stdio.h included before everything else. On top of this, there's the problem that windows doesn't support strerror_r, so we have a workaround which emulates strerror_r with snprintf. Though it's easier to use a seperate compilation unit and use a wrapper function, to ensure the right feature test macros and workarounds are used. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2018-02-09config: Copy configuration file also when unit testing disabledDavid Kahles1-1/+1
Initialize rc with -1, so that the next if statement evaluates to true. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-12vio: Fix a build warning if we build without testingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-12src: Use __func__ instead of __FUNCTION__Andreas Schneider2-2/+2
This fixes compilation with newer GCC versions. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-12cmake: Remove FindLibSSHAndreas Schneider1-96/+0
libssh provides cmake find files now. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2016-11-12Update .gitignoreAndreas Schneider1-3/+4
2015-11-04c_mkdirs: Fix error checking of utf8 conversion functionAndreas Schneider1-12/+25
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-11-04log: Make sure buffer is initialized correctlyAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-11-04lock: Correctly handle utf8 conversion errorsAndreas Schneider1-2/+7
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2015-02-25cmake: Drop test results via https.Andreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@samba.org>
2014-12-02Added options and minor changes to CMAKEMorten W. Jørgensen5-6/+22
+ Added option WITH_LOCAL_PLUGINDIR thus allowing for storage of plugins in the same directory as the executable. + Added option WITH_STATIC_LIB for building an additional static version of librsync. + Changed a few CMAKE_SOURCE to CMAKE_CURRENT_SOURCE Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2014-11-19cmake: Enable compile command database.Andreas Schneider1-0/+3
2013-12-11cmake: Increase required cmake version number.Andreas Schneider1-1/+1
We need CheckPrototypeDefinition.
2013-10-28sftp: Use sftp_connect_uri().Andreas Schneider1-74/+45
2013-10-28sftp: Add sftp_connect_uri().Andreas Schneider1-2/+22
2013-10-28sftp: No need to allocate path here.Andreas Schneider1-3/+1
2013-10-28cmake: Fix error with earlier cmake version.Andreas Schneider1-1/+1
This fixes the build on SLES11.
2013-09-11cmake: Update the libsmbclient cmake module.Andreas Schneider1-48/+34
2013-09-09owncloud: Make sure we check _cleanPath return valueChristophe Fergeau1-2/+30
It can return NULL on uris like owncloud://owncloud.example.com/ and this will lead to crashes if we don't error out early when this happens. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-09-09owncloud: Fix crash in _cleanPath with URIs with no pathChristophe Fergeau1-1/+2
Calling _cleanPath() with an URI with no path (eg owncloud://owncloud.example.com) would result in a crash in _cleanPath(). This was fixed in 2d6514b5 but part of the fix was silently lost in 3de8a78e during refactoring. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-08-01tests: Package testfiles as xz archive.Andreas Schneider3-1/+1
2013-08-01Update ChangeLog.Andreas Schneider1-21/+18
2013-08-01MacOSX: Add a mac specific header to avoid a build warning.Klaas Freitag1-0/+4
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-08-01Use strerror_r outside of log functions to avoid warnings.Klaas Freitag2-4/+4
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-08-01vio: Fix compile error if WITH_UNIT_TESTING is not defined.Klaas Freitag1-1/+1
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-08-01tests: Moved all ownCloud testfiles into tarball.Klaas Freitag16-19/+4
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-08-01Set csync version to 0.50.0Klaas Freitag3-6/+6
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2013-08-01client: Fix strtol error check.Andreas Schneider1-3/+3