The maximum path length for a UNIX domain socket is much lower than for
other file types.
Fixes: QTCREATORBUG-21748
Change-Id: I5e27169f356d7a2960a817e308a1f5d4858b6f7d
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Otherwise, if connection sharing is disabled and public key
authentication fails, the askpass tool is not invoked.
Change-Id: Iea8316675b8f270c924f822f340f6282b21450d5
Reviewed-by: hjk <hjk@qt.io>
The file watching objects are temporary in nature and don't need to be
class members.
Change-Id: I845e4f8599a338517f6fc26ffd9d0061466ba33e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Using rsync enables proper incremental deployment and is particularly
helpful when larger files are involved.
We check whether rsync works as part of the device test. If it does, it
becomes the default deploy step, otherwise we fall back to SFTP.
Change-Id: I6ab938ccd5acd7e0cbe07b90b6938dccad19bba5
Reviewed-by: hjk <hjk@qt.io>
It's only ever needed at startup, no need to keep it around after that.
Change-Id: Icc1ada71177d4f81b0b84cd3607a8a8b7af9cec2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
... instead of our own SSH library.
Advantages:
- Full compatibility with OpenSSH behavior guaranteed.
- Minimal maintenance effort.
- Less code to build.
- Big chunk of 3rd party sources can be removed from our repository.
One the downside, Windows users now need to install OpenSSH for
RemoteLinux support. Hoewever, people doing embedded development
probably have it installed anyway.
[ChangeLog] Switched SSH backend to OpenSSH
Fixes: QTCREATORBUG-15744
Fixes: QTCREATORBUG-15807
Fixes: QTCREATORBUG-19306
Fixes: QTCREATORBUG-20210
Change-Id: Ifcfefdd39401e45ba1f4aca35d2c5bf7046c7aab
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Botan 1.10 will be completely unsupported by the end of this year, so we
now target API version 2 instead.
Also upgrade our bundled Botan to the latest version 2.7. We no longer
check in pre-processed files, but use the upstream sources directly
(with unneeded parts removed), employing Botan's own configure
script for building. This will make future upgrades much simpler. A
script to automate this process is also provided.
Task-number: QTCREATORBUG-18802
Task-number: QTCREATORBUG-8107
Change-Id: I5a5ea62cfd30d720b556217142e8b7e06bf49f7e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Combine host, port, username and password into a 'url' member and
add some convenience accessors.
Change-Id: Iddc26ff00dad1285c96aa56f196dbc4febe8e974
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
In particular, the existence of Botan::Exception wrongly suggests that
it is the parent class of all Botan-specific exceptions. This
assumption, combined with a different bug that will be fixed in a
follow-up commit, caused a crash in the key generator.
Change-Id: I0aafb761052d185051df217c9914010235a7c77b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
SshClientException or SshServerException might
be thrown in SshAbstractCryptoFacility::convert
Change-Id: I0950ce8d7979c171926a12f6c6d94abeffcc4b93
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The heavy lifting was done by clazy.
Change-Id: I04261849c92c54990f9f142fe541d984c5fb21d3
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
We hardcoded the remote host to the SSH server for some reason, and the
originating port was bogus as well.
Change-Id: I8f6700bc12f4374302dd3bfc035c9c9f060f56ef
Reviewed-by: Caspar Romot <cro@icd.ee>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This avoids unnecessary detaches of the Qt container data.
The mismatches where detected by defining QT_STRICT_ITERATORS;
however, this define violates the ODR (causing linker errors),
and therefore is not added permanently.
Change-Id: Idd336a9c8b394214a820437ef1b92d2101f6101c
GPush-Base: 62b0848b9c
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
Botan requires to be initialized before first use. We do that on-demand,
but currently we miss one of the two places where this is necessary.
The problem only manifests itself with multithreading, because Botan
itself also does an on-demand initialization, but does not guard
against concurrent access when doing so.
Task-number: QTCREATORBUG-9980
Change-Id: Id65c428e3d8842c8a6f16942b11d52412239d3c9
Reviewed-by: David Kaspar <dkaspar@blackberry.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
There is now at least one Linux distribution (openSUSE 12.3) that
disables the "password" authentication method in its default
sshd_config, while others allow it, but disable "keyboard-interactive".
This patch tackles the problem as follows:
1) Implement RFC 4256 ("keyboard-interactive") and make this method
available in the API.
2) In addition, the API offers to try both password-based methods
one after the other, until one has succeeded or all have failed.
3) Dialogs continue to offer just the choice between "Password" and
"Key", as to not confuse users. Internally, "Password" uses the feature
described in 2).
Task-number: QTCREATORBUG-9568
Change-Id: Ic81bd5d2dc4b1332ea1a8be938c19811c21a9087
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
QDoc does some magic with the \class and \namespaces
and \brief commands, so the following wording must be used:
"The xxx class yyy ..."
Change-Id: Id231f30e8464898b776888d5423523de404aae34
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
#!/usr/bin/env ruby
Dir.glob('**/*.cpp') { |file|
# skip ast (excluding paste, astpath, and canv'ast'imer)
next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
s = File.read(file)
next if s.include?('qlalr')
orig = s.dup
s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
res = $&
if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
res
else
res.gsub!('} else', 'else')
res.gsub!(/\n +} *\n/m, "\n")
res.gsub(/ *{$/, '')
end
}
s.gsub!(/ *$/, '')
File.open(file, 'wb').write(s) if s != orig
}
Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
While we want to conform to the specs, there are systems out there today
whose SSH servers send non-conforming identifications strings. We now
enable API clients to switch the respecive checks off, and we do so
ourselves in the RemoteLinux plugin, since the only known problems
are with OpenSSH servers.
Change-Id: I9e6f9076f2dc7435a0bde7016f99cfb2fcb30a9c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
So far, the only option is whether to use the default proxy or not. More
will follow.
Change-Id: Icd1ec407a0269cc8e7577901853d3873fd03015c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
The current implementation is a bit sloppy, so one can construct certain
invalid strings that will be accepted as well as certain valid ones that
will be rejected. The new checks are much more precise.
Most importantly in practice, the version string "1.99" sent by some
older servers is now accepted, as required by the RFC.
Change-Id: Ib35c27d3a3bc4aea259b9a0dad66817435d95c0a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
They are deprecated in Qt 5. Use fromLatin1() and toLatin1() instead. In
Qt 5, these always do the same thing as their "Ascii" counterparts. The
same goes for Qt 4, provided QTextCodec::setCodecForCStrings has not
been set, which it hasn't.
Change-Id: I04edeb376762b6671eff8156094f0d5e2cb8e1ea
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This is the "direct-tcpip" port forwarding
specified in RFC 4254.
Change-Id: I1ffa2e923b4479c7211b1b4304e66895b565fb64
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
We can't just pretend a channel is already gone after we request it to
close; it's only closed when the server has sent the acknowledgement.
Change-Id: Ib6e8b9bf77635995259885af13755f5fc0e825a9
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Otherwise a new client acquiring the connection could be affected by
things happening in channels that were not opened by that client, which
would certainly be unexpected.
In particular, if the new owner of the connection runs in a different
thread than the old one, crashes could occur since the connection
assumes its channels run in the same thread.
Change-Id: I4fdf2b5a3751ed506631d6878e94342da033c31c
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Old version was 1.8.8, new one is 1.10.2.
We now put all the code into one pair of files (via
a botan configure option) and move platform-specific
defines into the pro/qbs files. Besides drastically
reducing the number of files, this is expected to make
future updates less messy.
Change-Id: I004166b2ab15b6a699d69aebfcfd9999c5ccdb91
Reviewed-by: hjk <qthjk@ovi.com>