summaryrefslogtreecommitdiff
path: root/freefilesync/debian/patches/ffs_libssh2.patch
blob: 0abd6600286c4c484bb759ecaedc09abdc1813c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Source: https://aur.archlinux.org/cgit/aur.git/commit/?h=freefilesync&id=7e1524db8e0243ff9d7b7dcba64a3a5228295725
Author: Simon Brulhart
Message: libssh2 v1.8.0 does not yet implement LIBSSH2_SFTP_DEFAULT_MODE, revert to previous impl.
Method:

    sed -e 's/LIBSSH2_SFTP_DEFAULT_MODE/LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO/g' -i 'FreeFileSync/Source/afs/sftp.cpp'

Source: <none>
Author: B Stack
Message: libssh2 v1.8.0 does not yet implement these two error messages. I do not know why distros are not serving libssh2 v1.9.0 which wa released June 20, 2019.
Date: 2019-09-17T13:41:23Z
--- 10.17-0/FreeFileSync/Source/afs/libssh2/libssh2_wrap.h	2019-10-17 15:59:11.681641905 -0400
+++ 10.17-1/FreeFileSync/Source/afs/libssh2/libssh2_wrap.h	2019-10-21 08:32:59.666149954 -0400
@@ -172,8 +172,8 @@
             ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_ENCRYPT);
             ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_BAD_SOCKET);
             ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KNOWN_HOSTS);
-            ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_CHANNEL_WINDOW_FULL);
-            ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KEYFILE_AUTH_FAILED);
+            //ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_CHANNEL_WINDOW_FULL);
+            //ZEN_CHECK_CASE_FOR_CONSTANT(LIBSSH2_ERROR_KEYFILE_AUTH_FAILED);
     }
     return replaceCpy<std::wstring>(L"SSH status %x.", L"%x", numberTo<std::wstring>(sc));
 }
diff -x '*.swp' -x .git -Naur 10.10-0/FreeFileSync/Source/afs/sftp.cpp 10.10-1/FreeFileSync/Source/afs/sftp.cpp
--- 10.10-0/FreeFileSync/Source/afs/sftp.cpp	2019-03-12 08:09:58.465098982 -0400
+++ 10.17-1/FreeFileSync/Source/afs/sftp.cpp	2019-10-21 08:46:07.562161269 -0400
@@ -1588,7 +1588,7 @@
             runSftpCommand(login_, L"libssh2_sftp_mkdir", //throw SysError
                            [&](const SshSession::Details& sd) //noexcept!
             {
-                return ::libssh2_sftp_mkdir(sd.sftpChannel, getLibssh2Path(afsPath), LIBSSH2_SFTP_DEFAULT_MODE);
+                return ::libssh2_sftp_mkdir(sd.sftpChannel, getLibssh2Path(afsPath), LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO);
                 //default for newly created directories: 0777 (LIBSSH2_SFTP_S_IRWXU | LIBSSH2_SFTP_S_IRWXG | LIBSSH2_SFTP_S_IRWXO)
             });
         }
bgstack15