Hello community,

here is the log from the commit of package krdc for openSUSE:Factory checked in 
at 2015-01-21 22:11:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/krdc (Old)
 and      /work/SRC/openSUSE:Factory/.krdc.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "krdc"

Changes:
--------
--- /work/SRC/openSUSE:Factory/krdc/krdc.changes        2015-01-08 
23:18:18.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.krdc.new/krdc.changes   2015-01-21 
22:11:35.000000000 +0100
@@ -1,0 +2,7 @@
+Mon Jan 12 20:02:08 UTC 2015 - [email protected]
+
+- Update to KDE Applications 14.12.1
+   * KDE Applications 14.12.1
+   * See https://www.kde.org/announcements/announce-applications-14.12.1.php
+
+-------------------------------------------------------------------

Old:
----
  krdc-14.12.0.tar.xz

New:
----
  krdc-14.12.1.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ krdc.spec ++++++
--- /var/tmp/diff_new_pack.ACxyuC/_old  2015-01-21 22:11:36.000000000 +0100
+++ /var/tmp/diff_new_pack.ACxyuC/_new  2015-01-21 22:11:36.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package krdc
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,7 +25,7 @@
 BuildRequires:  pkgconfig(TelepathyQt4)
 %endif
 BuildRequires:  oxygen-icon-theme-large
-Version:        14.12.0
+Version:        14.12.1
 Release:        0
 Summary:        Remote Desktop Connection
 License:        GPL-2.0+

++++++ krdc-14.12.0.tar.xz -> krdc-14.12.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krdc-14.12.0/mainwindow.cpp 
new/krdc-14.12.1/mainwindow.cpp
--- old/krdc-14.12.0/mainwindow.cpp     2014-09-07 06:19:24.000000000 +0200
+++ new/krdc-14.12.1/mainwindow.cpp     2015-01-05 20:42:32.000000000 +0100
@@ -279,7 +279,15 @@
 
 KUrl MainWindow::getInputUrl()
 {
-    return KUrl(m_protocolInput->currentText() + "://" + 
m_addressInput->text());
+    QString userInput = m_addressInput->text();
+
+    // percent encode usernames so KUrl can parse it
+    int lastAtIndex = userInput.indexOf(QRegExp("@[^@]+$"));
+    if (lastAtIndex >0) {
+        userInput = KUrl::toPercentEncoding(userInput.left(lastAtIndex)) + 
userInput.mid(lastAtIndex);
+    }
+
+    return KUrl(m_protocolInput->currentText() + "://" + userInput);
 }
 
 void MainWindow::newConnection(const KUrl &newUrl, bool 
switchFullscreenWhenConnected, const QString &tabName)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/krdc-14.12.0/rdp/rdpview.cpp 
new/krdc-14.12.1/rdp/rdpview.cpp
--- old/krdc-14.12.0/rdp/rdpview.cpp    2014-09-07 06:19:24.000000000 +0200
+++ new/krdc-14.12.1/rdp/rdpview.cpp    2015-01-05 20:42:32.000000000 +0100
@@ -146,102 +146,203 @@
         }
     }
 
+    // Check the version of FreeRDP so we can use pre-1.1 switches if needed
+    QProcess *xfreeRDPVersionCheck = new QProcess(this);
+    xfreeRDPVersionCheck->start("xfreerdp", QStringList("--version"));
+    xfreeRDPVersionCheck->waitForFinished();
+    QString versionOutput = xfreeRDPVersionCheck->readAllStandardOutput();
+    xfreeRDPVersionCheck->deleteLater();
+
     m_process = new QProcess(m_container);
 
     QStringList arguments;
 
-    int width, height;
-    if (m_hostPreferences->width() > 0) {
-        width = m_hostPreferences->width();
-        height = m_hostPreferences->height();
-    } else {
-        width = this->parentWidget()->size().width();
-        height = this->parentWidget()->size().height();
-    }
-    arguments << "-g" << QString::number(width) + 'x' + 
QString::number(height);
+    if (versionOutput.contains(QLatin1String(" 1.0"))) {
+        kDebug(5012) << "Use FreeRDP 1.0 compatible arguments";
+
+        int width, height;
+        if (m_hostPreferences->width() > 0) {
+            width = m_hostPreferences->width();
+            height = m_hostPreferences->height();
+        } else {
+            width = this->parentWidget()->size().width();
+            height = this->parentWidget()->size().height();
+        }
+        arguments << "-g" << QString::number(width) + 'x' + 
QString::number(height);
 
-    arguments << "-k" << keymapToXfreerdp(m_hostPreferences->keyboardLayout());
+        arguments << "-k" << 
keymapToXfreerdp(m_hostPreferences->keyboardLayout());
 
-    if (!m_url.userName().isEmpty()) {
-        // if username contains a domain, it needs to be set with another 
parameter
-        if (m_url.userName().contains('\\')) {
-            const QStringList splittedName = m_url.userName().split('\\');
-            arguments << "-d" << splittedName.at(0);
-            arguments << "-u" << splittedName.at(1);
+        if (!m_url.userName().isEmpty()) {
+            // if username contains a domain, it needs to be set with another 
parameter
+            if (m_url.userName().contains('\\')) {
+                const QStringList splittedName = m_url.userName().split('\\');
+                arguments << "-d" << splittedName.at(0);
+                arguments << "-u" << splittedName.at(1);
+            } else {
+                arguments << "-u" << m_url.userName();
+            }
         } else {
-            arguments << "-u" << m_url.userName();
+            arguments << "-u" << "";
         }
-    } else {
-        arguments << "-u" << "";
-    }
 
-    if (!m_url.password().isNull())
-        arguments << "-p" << m_url.password();
+        arguments << "-D";  // request the window has no decorations
+        arguments << "-X" << QString::number(m_container->winId());
+        arguments << "-a" << QString::number((m_hostPreferences->colorDepth() 
+ 1) * 8);
+
+        switch (m_hostPreferences->sound()) {
+        case 1:
+            arguments << "-o";
+            break;
+        case 0:
+            arguments << "--plugin" << "rdpsnd";
+            break;
+        case 2:
+        default:
+            break;
+        }
 
-    arguments << "-D";  // request the window has no decorations
-    arguments << "-X" << QString::number(m_container->winId());
-    arguments << "-a" << QString::number((m_hostPreferences->colorDepth() + 1) 
* 8);
+        if (!m_hostPreferences->shareMedia().isEmpty()) {
+            QStringList shareMedia;
+            shareMedia << "--plugin" << "rdpdr" << "--data" << "disk:media:" + 
m_hostPreferences->shareMedia() << "--";
+            arguments += shareMedia;
+        }
 
-    switch (m_hostPreferences->sound()) {
-    case 1:
-        arguments << "-o";
-        break;
-    case 0:
-        arguments << "--plugin" << "rdpsnd";
-        break;
-    case 2:
-    default:
-        break;
-    }
+        QString performance;
+        switch (m_hostPreferences->performance()) {
+        case 0:
+            performance = 'm';
+            break;
+        case 1:
+            performance = 'b';
+            break;
+        case 2:
+            performance = 'l';
+            break;
+        default:
+            break;
+        }
 
-    if (!m_hostPreferences->shareMedia().isEmpty()) {
-        QStringList shareMedia;
-        shareMedia << "--plugin" << "rdpdr" << "--data" << "disk:media:" + 
m_hostPreferences->shareMedia() << "--";
-        arguments += shareMedia;
-    }
+        arguments << "-x" << performance;
 
-    QString performance;
-    switch (m_hostPreferences->performance()) {
-    case 0:
-        performance = 'm';
-        break;
-    case 1:
-        performance = 'b';
-        break;
-    case 2:
-        performance = 'l';
-        break;
-    default:
-        break;
-    }
+        if (m_hostPreferences->console()) {
+            arguments << "-0";
+        }
 
-    arguments << "-x" << performance;
+        if (m_hostPreferences->remoteFX()) {
+            arguments << "--rfx";
+        }
 
-    if (m_hostPreferences->console()) {
-        arguments << "-0";
-    }
+        if (!m_hostPreferences->extraOptions().isEmpty()) {
+            const QStringList additionalArguments = 
KShell::splitArgs(m_hostPreferences->extraOptions());
+            arguments += additionalArguments;
+        }
 
-    if (m_hostPreferences->remoteFX()) {
-        arguments << "--rfx";
-    }
+        // krdc has no support for certificate management yet; it would not be 
possbile to connect to any host:
+        // "The host key for example.com has changed" ...
+        // "Add correct host key in ~/.freerdp/known_hosts to get rid of this 
message."
+        arguments << "--ignore-certificate";
+
+        // clipboard sharing is activated in KRDC; user can disable it at 
runtime
+        arguments << "--plugin" << "cliprdr";
+
+        arguments << "-t" << QString::number(m_port);
+        arguments << m_host;
+
+        kDebug(5012) << "Starting xfreerdp with arguments: " << 
arguments.join(" ");
+
+        arguments.removeLast(); // host must be last, remove and re-add it 
after the password
+        if (!m_url.password().isNull())
+            arguments << "-p" << m_url.password();
+        arguments << m_host;
 
-    if (!m_hostPreferences->extraOptions().isEmpty()) {
-        const QStringList additionalArguments = 
KShell::splitArgs(m_hostPreferences->extraOptions());
-        arguments += additionalArguments;
-    }
+    } else {
+        kDebug(5012) << "Use FreeRDP 1.1+ compatible arguments";
+
+        int width, height;
+        if (m_hostPreferences->width() > 0) {
+            width = m_hostPreferences->width();
+            height = m_hostPreferences->height();
+        } else {
+            width = this->parentWidget()->size().width();
+            height = this->parentWidget()->size().height();
+        }
+        arguments << "-decorations";
+        arguments << "/w:" + QString::number(width);
+        arguments << "/h:" + QString::number(height);
+
+        arguments << "/kbd:" + 
keymapToXfreerdp(m_hostPreferences->keyboardLayout());
+
+        if (!m_url.userName().isEmpty()) {
+            // if username contains a domain, it needs to be set with another 
parameter
+            if (m_url.userName().contains('\\')) {
+                const QStringList splittedName = m_url.userName().split('\\');
+                arguments << "/d:" + splittedName.at(0);
+                arguments << "/u:" + splittedName.at(1);
+            } else {
+                arguments << "/u:" + m_url.userName();
+            }
+        } else {
+            arguments << "/u:";
+        }
+
+        arguments << "/parent-window:" + QString::number(m_container->winId());
+        arguments << "/bpp:" + 
QString::number((m_hostPreferences->colorDepth() + 1) * 8);
+        arguments << "/audio-mode:" + 
QString::number(m_hostPreferences->sound());
+
+        if (!m_hostPreferences->shareMedia().isEmpty()) {
+            QStringList shareMedia;
+            shareMedia << "/drive:media," + m_hostPreferences->shareMedia();
+            arguments += shareMedia;
+        }
+
+        QString performance;
+        switch (m_hostPreferences->performance()) {
+        case 0:
+            performance = "modem";
+            break;
+        case 1:
+            performance = "broadband";
+            break;
+        case 2:
+            performance = "lan";
+            break;
+        default:
+            break;
+        }
 
-    // krdc has no support for certificate management yet; it would not be 
possbile to connect to any host:
-    // "The host key for example.com has changed" ...
-    // "Add correct host key in ~/.freerdp/known_hosts to get rid of this 
message."
-    arguments << "--ignore-certificate";
+        arguments << "/network:" + performance;
 
-    // clipboard sharing is activated in KRDC; user can disable it at runtime
-    arguments << "--plugin" << "cliprdr";
+        if (m_hostPreferences->console()) {
+            arguments << "/admin";
+        }
+
+        if (m_hostPreferences->remoteFX()) {
+            arguments << "/rfx";
+        }
 
-    arguments << "-t" << QString::number(m_port);
-    arguments << m_host;
+        if (!m_hostPreferences->extraOptions().isEmpty()) {
+            const QStringList additionalArguments = 
KShell::splitArgs(m_hostPreferences->extraOptions());
+            arguments += additionalArguments;
+        }
 
-    kDebug(5012) << "Starting xfreerdp with arguments:" << arguments;
+        // krdc has no support for certificate management yet; it would not be 
possbile to connect to any host:
+        // "The host key for example.com has changed" ...
+        // "Add correct host key in ~/.freerdp/known_hosts to get rid of this 
message."
+        arguments << "/cert-ignore";
+
+        // clipboard sharing is activated in KRDC; user can disable it at 
runtime
+        arguments << "+clipboard";
+
+        arguments << "/port:" + QString::number(m_port);
+        arguments << "/v:" + m_host;
+
+        kDebug(5012) << "Starting xfreerdp with arguments: " << 
arguments.join(" ");
+
+        //avoid printing the password in debug
+        if (!m_url.password().isNull()) {
+            arguments << "/p:" + m_url.password();
+        }
+    }
 
     setStatus(Connecting);
 
@@ -302,7 +403,7 @@
 
 void RdpView::processError(QProcess::ProcessError error)
 {
-    kDebug(5012) << "processError:" << error;
+    kDebug(5012) << error;
     if (m_quitFlag) // do not try to show error messages while quitting 
(prevent crashes)
         return;
 
@@ -319,11 +420,11 @@
 void RdpView::receivedStandardError()
 {
     const QString output(m_process->readAllStandardError());
-    kDebug(5012) << "receivedStandardError:" << output;
+    kDebug(5012) << output;
     QString line;
     int i = 0;
     while (!(line = output.section('\n', i, i)).isEmpty()) {
-        
+
         // the following error is issued by freerdp because of a bug in 
freerdp 1.0.1 and below;
         // see: https://github.com/FreeRDP/FreeRDP/pull/576
         //"X Error of failed request:  BadWindow (invalid Window parameter)
@@ -345,11 +446,9 @@
 void RdpView::receivedStandardOutput()
 {
     const QString output(m_process->readAllStandardOutput());
-    kDebug(5012) << "receivedStandardOutput:" << output;
-    QString line;
-    int i = 0;
-    while (!(line = output.section('\n', i, i)).isEmpty()) {
-
+    kDebug(5012) << output;
+    QStringList splittedOutput = output.split('\n');
+    Q_FOREACH (const QString &line, splittedOutput) {
         // full xfreerdp message: "transport_connect: getaddrinfo (Name or 
service not known)"
         if (line.contains(QLatin1String("Name or service not known"))) {
             KMessageBox::error(0, i18n("Name or service not known."),
@@ -364,16 +463,21 @@
             connectionError();
             return;
 
+        } else if (line.contains(QLatin1String("Authentication failure, check 
credentials"))) {
+            KMessageBox::error(0, i18n("Connection attempt to host failed."),
+                               i18n("Connection Failure"));
+            connectionError();
+            return;
+
         // looks like some generic xfreerdp error message, handle it if 
nothing was handled:
         // "Error: protocol security negotiation failure"
-        } else if (line.contains(QLatin1String("Error: protocol security 
negotiation failure"))) {
+        } else if (line.contains(QLatin1String("Error: protocol security 
negotiation failure")) || // xfreerdp 1.0
+            line.contains(QLatin1String("Error: protocol security negotiation 
or connection failure"))) { // xfreerdp 1.2
             KMessageBox::error(0, i18n("Connection attempt to host failed."),
                                i18n("Connection Failure"));
             connectionError();
             return;
         }
-
-        i++;
     }
 }
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to