gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] 13/220: ssh-libssh: do not specify O_APPEND when no


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 13/220: ssh-libssh: do not specify O_APPEND when not in append mode
Date: Thu, 12 Sep 2019 17:26:13 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit 62617495102c60124db8a909f592f063e38a89aa
Author: Felix Hädicke <address@hidden>
AuthorDate: Wed Jul 24 11:47:51 2019 +0200

    ssh-libssh: do not specify O_APPEND when not in append mode
    
    Specifying O_APPEND in conjunction with O_TRUNC and O_CREAT does not
    make much sense. And this combination of flags is not accepted by all
    SFTP servers (at least not Apache SSHD).
    
    Fixes #4147
    Closes #4148
---
 lib/ssh-libssh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c
index ca1337677..879358eba 100644
--- a/lib/ssh-libssh.c
+++ b/lib/ssh-libssh.c
@@ -1119,7 +1119,7 @@ static CURLcode myssh_statemach_act(struct connectdata 
*conn, bool *block)
         flags = O_WRONLY|O_APPEND;
       else
         /* Clear file before writing (normal behaviour) */
-        flags = O_WRONLY|O_APPEND|O_CREAT|O_TRUNC;
+        flags = O_WRONLY|O_CREAT|O_TRUNC;
 
       if(sshc->sftp_file)
         sftp_close(sshc->sftp_file);

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]