1. 03 Jul, 2017 1 commit
    • Make sure to always include "common.h" first · 0c7f49dd
      Next to including several files, our "common.h" header also declares
      various macros which are then used throughout the project. As such, we
      have to make sure to always include this file first in all
      implementation files. Otherwise, we might encounter problems or even
      silent behavioural differences due to macros or defines not being
      defined as they should be. So in fact, our header and implementation
      files should make sure to always include "common.h" first.
      
      This commit does so by establishing a common include pattern. Header
      files inside of "src" will now always include "common.h" as its first
      other file, separated by a newline from all the other includes to make
      it stand out as special. There are two cases for the implementation
      files. If they do have a matching header file, they will always include
      this one first, leading to "common.h" being transitively included as
      first file. If they do not have a matching header file, they instead
      include "common.h" as first file themselves.
      
      This fixes the outlined problems and will become our standard practice
      for header and source files inside of the "src/" from now on.
      Patrick Steinhardt committed
  2. 02 May, 2017 2 commits
  3. 29 Dec, 2016 1 commit
  4. 03 Mar, 2016 1 commit
    • ssh: initialize libssh2 · 22f3d3aa
      We should have been doing this, but it initializes itself upon first
      use, which works as long as nobody's doing concurrent network
      operations. Initialize it on our init to make sure it's not getting
      initialized concurrently.
      Carlos Martín Nieto committed
  5. 28 Dec, 2015 1 commit
  6. 26 Dec, 2015 1 commit
  7. 22 Dec, 2015 1 commit
  8. 14 Aug, 2015 1 commit
  9. 03 Aug, 2015 1 commit
  10. 10 Jul, 2015 1 commit
  11. 09 Jun, 2015 1 commit
  12. 02 Jun, 2015 1 commit
  13. 27 May, 2015 2 commits
  14. 20 May, 2015 2 commits
  15. 18 Mar, 2015 1 commit
  16. 10 Dec, 2014 1 commit
  17. 27 Oct, 2014 2 commits
  18. 22 Sep, 2014 1 commit
  19. 16 Sep, 2014 8 commits
  20. 04 Sep, 2014 1 commit
    • ssh: store error message immediately after a failed agent call · 2dc399a8
      When the call to the agent fails, we must retrieve the error message
      just after the function call, as other calls may overwrite it.
      
      As the agent authentication is the only one which has a teardown and
      there does not seem to be a way to get the error message from a stored
      error number, this tries to introduce some small changes to store the
      error from the agent.
      
      Clearing the error at the beginning of the loop lets us know whether the
      agent has already set the libgit2 error message and we should skip it,
      or if we should set it.
      Carlos Martín Nieto committed
  21. 05 Aug, 2014 1 commit
  22. 16 Jul, 2014 1 commit
  23. 07 Jul, 2014 1 commit
  24. 03 Jul, 2014 1 commit
  25. 02 Jul, 2014 1 commit
    • ssh: libssh2_channel_write() behaves like send() · 0963716b
      When the stream writing function was written, it assume that
      libssh2_channel_write() would always write all of the data to the
      wire. This is only true for the first 32k of data, which it tries to
      fit into one ssh packet.
      
      Since it can perform short writes, call it in a loop like we do for
      send(), advancing the buffer offset.
      Carlos Martín Nieto committed
  26. 26 Jun, 2014 2 commits
    • ssh: make sure to ask for a username and use the same one · ccb85c8f
      In order to know which authentication methods are supported/allowed by
      the ssh server, we need to send a NONE auth request, which needs a
      username associated with it.
      
      Most ssh server implementations do not allow switching the username
      between authentication attempts, which means we cannot use a dummy
      username and then switch. There are two ways around this.
      
      The first is to use a different connection, which an earlier commit
      implements, but this increases how long it takes to get set up, and
      without knowing the right username, we cannot guarantee that the
      list we get in response is the right one.
      
      The second is what's implemented here: if there is no username specified
      in the url, ask for it first. We can then ask for the list of auth
      methods and use the user's credentials in the same connection.
      Carlos Martín Nieto committed
    • ssh: request credentials again on authentication failure · d7f962f4
      Instead of completely giving up on the first failure, ask for
      credentials as long as we fail to authenticate.
      Carlos Martín Nieto committed
  27. 17 Jun, 2014 2 commits