Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
DISCONTINUED:openSUSE:11.1:Update
NetworkManager-kde
fix_vpnc_openvpn.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix_vpnc_openvpn.patch of Package NetworkManager-kde
diff -ur BUILD/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/openvpn/AUTHORS BUILD2/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/openvpn/AUTHORS --- BUILD/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/openvpn/AUTHORS 2008-08-18 08:19:15.000000000 +0200 +++ BUILD2/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/openvpn/AUTHORS 2008-09-25 13:58:30.000000000 +0200 @@ -1 +1,2 @@ Helmut Schaa <hschaa@suse.de>, <helmut.schaa@gmx.de> +Thomas Kallenberg <tkallenb@hsr.ch> <thomas@no-more-secrets.ch> diff -ur BUILD/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/openvpn/src/knetworkmanager-openvpn.cpp BUILD2/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/openvpn/src/knetworkmanager-openvpn.cpp --- BUILD/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/openvpn/src/knetworkmanager-openvpn.cpp 2008-08-18 08:19:15.000000000 +0200 +++ BUILD2/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/openvpn/src/knetworkmanager-openvpn.cpp 2008-09-25 13:58:30.000000000 +0200 @@ -190,30 +190,29 @@ } -void OpenVPNConfig::setVPNData(const QStringList& routes, const QMap<QString, QDBusData>& properties) +void OpenVPNConfig::setVPNData(const QStringList& routes, const QMap<QString, QString>& properties) { - // fill up our inputfields - for(QMap<QString, QDBusData>::ConstIterator it = properties.begin(); it != properties.end(); ++it) + for(QMap<QString, QString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) { QString entry = it.key(); - QDBusData value = it.data(); + QString value = it.data(); if (entry == "connection-type") { - OpenVPNConnectionType::CONNECTIONTYPE type = OpenVPNConnectionType::mapString2ConnectionType(value.toInt32()); + OpenVPNConnectionType::CONNECTIONTYPE type = OpenVPNConnectionType::mapString2ConnectionType(value.toInt()); _openvpnWidget->cboConnectionType->setCurrentItem(type); _openvpnWidget->widgetStack->raiseWidget(type); } else if (entry == "remote") { - _openvpnWidget->gateway->setText(value.toString()); + _openvpnWidget->gateway->setText(value); } else if (entry == "port") { - if (value.toInt32() > 0) + if (value.toInt() > 0) { - _openvpnWidget->port->setText(QString::number(value.toInt32())); + _openvpnWidget->port->setText(value); _openvpnWidget->chkDefaultPort->setChecked(false); } else @@ -223,55 +222,56 @@ } else if (entry == "proto" || entry == "proto-tcp") { - _openvpnWidget->chkUseTCP->setChecked( value.toBool() ); + _openvpnWidget->chkUseTCP->setChecked( value == "yes"); } else if (entry == "ca") { - _openvpnWidget->editCA->setURL(value.toString()); + _openvpnWidget->editCA->setURL(value); } else if (entry == "cert") { - _openvpnWidget->editCert->setURL(value.toString()); + _openvpnWidget->editCert->setURL(value); } else if (entry == "key") { - _openvpnWidget->editKey->setURL(value.toString()); + _openvpnWidget->editKey->setURL(value); } else if (entry == "cipher") { _openvpnWidget->chkUseCipher->setChecked(true); - _openvpnWidget->cboCipher->setCurrentItem(value.toString()); + _openvpnWidget->cboCipher->setCurrentItem(value); } else if (entry == "comp-lzo") { - _openvpnWidget->chkUseLZO->setChecked(value.toBool()); + _openvpnWidget->chkUseLZO->setChecked(value == "true"); } else if (entry == "shared-key" || entry == "static-key") { - _openvpnWidget->editSharedKey->setURL(value.toString()); + _openvpnWidget->editSharedKey->setURL(value); } else if (entry == "username") { - _openvpnWidget->editUsername->setText(value.toString()); + _openvpnWidget->editUsername->setText(value); } else if (entry == "local-ip") { - _openvpnWidget->editLocalIP->setText(value.toString()); + _openvpnWidget->editLocalIP->setText(value); } else if (entry == "remote-ip") { - _openvpnWidget->editRemoteIP->setText(value.toString()); + _openvpnWidget->editRemoteIP->setText(value); + } + else if (entry == "dev" || entry == "tap-dev") { + _openvpnWidget->chkUseTAP->setChecked(value == "true"); } - else if (entry == "dev" || entry == "tap-dev") - _openvpnWidget->chkUseTAP->setChecked( value.toBool() ); else if (entry == "ta") { _openvpnWidget->chkUseTLS->setChecked(true); - _openvpnWidget->editTLSAuth->setURL( value.toString() ); + _openvpnWidget->editTLSAuth->setURL(value); } else if (entry == "ta-dir") { - _openvpnWidget->cboDirection->setCurrentItem( value.toString() ); + _openvpnWidget->cboDirection->setCurrentItem(value); } else { @@ -287,41 +287,47 @@ } } -QMap<QString, QDBusData>OpenVPNConfig::getVPNProperties() +QMap<QString, QString>OpenVPNConfig::getVPNProperties() { // build a StingList of properties - QMap<QString, QDBusData> strlist; - - // TODO sync properties with NM trunk + QMap<QString, QString> strlist; - strlist.insert("connection-type", QDBusData::fromInt32(OpenVPNConnectionType::mapConnectionType2String((OpenVPNConnectionType::CONNECTIONTYPE)_openvpnWidget->cboConnectionType->currentItem()))); - strlist.insert("remote", QDBusData::fromString(_openvpnWidget->gateway->text())); + strlist.insert("connection-type", QString::number(OpenVPNConnectionType::mapConnectionType2String((OpenVPNConnectionType::CONNECTIONTYPE)_openvpnWidget->cboConnectionType->currentItem()))); + strlist.insert("remote", QString(_openvpnWidget->gateway->text())); // port is not necessary if (!_openvpnWidget->port->text().isEmpty() && !_openvpnWidget->chkDefaultPort->isChecked()) - strlist.insert("port", QDBusData::fromInt32(_openvpnWidget->port->text().toInt())); + strlist.insert("port", _openvpnWidget->port->text()); - strlist.insert("ca", QDBusData::fromString(_openvpnWidget->editCA->url())); - strlist.insert("cert",QDBusData::fromString(_openvpnWidget->editCert->url() )); - strlist.insert("key", QDBusData::fromString(_openvpnWidget->editKey->url())); + strlist.insert("ca", QString(_openvpnWidget->editCA->url())); + strlist.insert("cert",QString(_openvpnWidget->editCert->url() )); + strlist.insert("key", QString(_openvpnWidget->editKey->url())); if (_openvpnWidget->chkUseCipher->isChecked()) - strlist.insert("cipher", QDBusData::fromString(_openvpnWidget->cboCipher->currentText())); + strlist.insert("cipher", QString(_openvpnWidget->cboCipher->currentText())); if (_openvpnWidget->chkUseLZO->isChecked()) - strlist.insert("comp-lzo", QDBusData::fromBool(true)); + strlist.insert("comp-lzo", QString("true")); + else + strlist.insert("comp-lzo", QString("false")); - strlist.insert("static-key", QDBusData::fromString(_openvpnWidget->editSharedKey->url())); - strlist.insert("username", QDBusData::fromString(_openvpnWidget->editUsername->text())); - strlist.insert("local-ip", QDBusData::fromString(_openvpnWidget->editLocalIP->text())); - strlist.insert("remote-ip", QDBusData::fromString(_openvpnWidget->editRemoteIP->text())); - strlist.insert("tap-dev", QDBusData::fromBool(_openvpnWidget->chkUseTAP->isChecked())); - strlist.insert("proto-tcp", QDBusData::fromBool(_openvpnWidget->chkUseTCP->isChecked())); + strlist.insert("static-key", QString(_openvpnWidget->editSharedKey->url())); + strlist.insert("username", QString(_openvpnWidget->editUsername->text())); + strlist.insert("local-ip", QString(_openvpnWidget->editLocalIP->text())); + strlist.insert("remote-ip", QString(_openvpnWidget->editRemoteIP->text())); + + if (_openvpnWidget->chkUseTAP->isChecked()) { + strlist.insert("tap-dev", "true"); + strlist.insert("proto-tcp", "true"); + } else { + strlist.insert("tap-dev", "false"); + strlist.insert("proto-tcp", "false"); + } if (_openvpnWidget->chkUseTLS->isChecked()) - strlist.insert("ta", QDBusData::fromString(_openvpnWidget->editTLSAuth->url())); + strlist.insert("ta", QString(_openvpnWidget->editTLSAuth->url())); - strlist.insert("ta-dir", QDBusData::fromString(_openvpnWidget->cboDirection->currentText())); + strlist.insert("ta-dir", QString(_openvpnWidget->cboDirection->currentText())); return strlist; } @@ -520,26 +526,26 @@ } -void OpenVPNAuthentication::setVPNData(const QStringList& /*routes*/, const QMap<QString, QDBusData>& properties) +void OpenVPNAuthentication::setVPNData(const QStringList& /*routes*/, const QMap<QString, QString>& properties) { // find the connection type property - for(QMap<QString, QDBusData>::ConstIterator it = properties.begin(); it != properties.end(); ++it) + for(QMap<QString, QString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) { if (it.key() == "connection-type") { - _connectionType = OpenVPNConnectionType::mapString2ConnectionType(it.data().toInt32()); + _connectionType = OpenVPNConnectionType::mapString2ConnectionType(it.data().toInt()); break; } } } -QMap<QString, QDBusData> OpenVPNAuthentication::getPasswords() +QMap<QString, QString> OpenVPNAuthentication::getPasswords() { - QMap<QString, QDBusData> pwds; + QMap<QString, QString> pwds; if ((_connectionType == OpenVPNConnectionType::PASSWORD) || (_connectionType == OpenVPNConnectionType::X509USERPASS)) - pwds.insert("password", QDBusData::fromString(_openvpnAuth->editUserPassword->password())); + pwds.insert("password", QString(_openvpnAuth->editUserPassword->password())); else - pwds.insert("no-secret", QDBusData::fromString("true")); + pwds.insert("no-secret", QString("true")); return pwds; } diff -ur BUILD/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/openvpn/src/knetworkmanager-openvpn.h BUILD2/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/openvpn/src/knetworkmanager-openvpn.h --- BUILD/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/openvpn/src/knetworkmanager-openvpn.h 2008-08-18 08:19:15.000000000 +0200 +++ BUILD2/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/openvpn/src/knetworkmanager-openvpn.h 2008-09-25 13:58:30.000000000 +0200 @@ -66,8 +66,8 @@ { Q_OBJECT public: - void setVPNData(const QStringList& routes, const QMap<QString, QDBusData>& properties); - QMap<QString, QDBusData> getVPNProperties(); + void setVPNData(const QStringList& routes, const QMap<QString, QString>& properties); + QMap<QString, QString> getVPNProperties(); QStringList getVPNRoutes(); bool hasChanged(); bool isValid(QStringList& ); @@ -94,8 +94,8 @@ public: OpenVPNAuthentication(QWidget* parent = NULL, char* name = NULL); ~OpenVPNAuthentication(); - void setVPNData(const QStringList&, const QMap<QString, QDBusData>&); - QMap<QString, QDBusData> getPasswords(); + void setVPNData(const QStringList&, const QMap<QString, QString>&); + QMap<QString, QString> getPasswords(); bool needsUserInteraction(); private: diff -ur BUILD/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/vpnc/AUTHORS BUILD2/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/vpnc/AUTHORS --- BUILD/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/vpnc/AUTHORS 2008-08-18 08:19:15.000000000 +0200 +++ BUILD2/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/vpnc/AUTHORS 2008-09-25 13:58:30.000000000 +0200 @@ -1 +1,2 @@ Helmut Schaa <hschaa@suse.de>, <Helmut.Schaa@gmx.de> +Thomas Kallenberg <tkallenb@hsr.ch> <thomas@no-more-secrets.ch> diff -ur BUILD/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/vpnc/src/knetworkmanager-vpnc.cpp BUILD2/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/vpnc/src/knetworkmanager-vpnc.cpp --- BUILD/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/vpnc/src/knetworkmanager-vpnc.cpp 2008-08-18 08:19:15.000000000 +0200 +++ BUILD2/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/vpnc/src/knetworkmanager-vpnc.cpp 2008-09-25 13:58:30.000000000 +0200 @@ -95,44 +95,44 @@ } -void VPNCConfig::setVPNData(const QStringList& routes, const QMap<QString, QDBusData>& properties) +void VPNCConfig::setVPNData(const QStringList& routes, const QMap<QString, QString>& properties) { // fill up our inputfields (only textfields atm) - for(QMap<QString, QDBusData>::ConstIterator it = properties.begin(); it != properties.end(); ++it) + for(QMap<QString, QString>::ConstIterator it = properties.begin(); it != properties.end(); ++it) { QString entry = it.key(); - QDBusData value = it.data(); + QString value = it.data(); if (entry == "IPSec gateway") { - _vpncWidget->IPSec_gateway->setText(value.toString()); + _vpncWidget->IPSec_gateway->setText(value); } else if (entry == "IPSec ID") { - _vpncWidget->IPSec_ID->setText(value.toString()); + _vpncWidget->IPSec_ID->setText(value); } else if (entry == "Xauth username") { - _vpncWidget->Xauth_username->setText(value.toString()); + _vpncWidget->Xauth_username->setText(value); _vpncWidget->chkOverrideUsername->setChecked(true); } else if (entry == "Domain") { - _vpncWidget->Domain->setText(value.toString()); + _vpncWidget->Domain->setText(value); _vpncWidget->chkUseDomain->setChecked(true); } else if (entry == "NAT-Keepalive packet interval") { - _vpncWidget->nat_keep_alive_interval->setText(value.toString()); + _vpncWidget->nat_keep_alive_interval->setText(value); _vpncWidget->chkUseKeepAlive->setChecked(true); } else if (entry == "Disable NAT Traversal") { - _vpncWidget->chkDisableNatTraversal->setChecked(value.toBool()); + _vpncWidget->chkDisableNatTraversal->setChecked(value == "true"); } else if (entry == "Enable Single DES") { - _vpncWidget->chkSingleDES->setChecked(value.toBool()); + _vpncWidget->chkSingleDES->setChecked(value == "true"); } } @@ -144,24 +144,24 @@ } } -QMap<QString, QDBusData> VPNCConfig::getVPNProperties() +QMap<QString, QString> VPNCConfig::getVPNProperties() { // build a StingList of properties - QMap<QString, QDBusData> strlist; - strlist.insert("IPSec gateway", QDBusData::fromString(_vpncWidget->IPSec_gateway->text())); - strlist.insert("IPSec ID", QDBusData::fromString(_vpncWidget->IPSec_ID->text())); + QMap<QString, QString> strlist; + strlist.insert("IPSec gateway", QString(_vpncWidget->IPSec_gateway->text())); + strlist.insert("IPSec ID", QString(_vpncWidget->IPSec_ID->text())); if (_vpncWidget->chkOverrideUsername->isChecked()) - strlist.insert("Xauth username", QDBusData::fromString(_vpncWidget->Xauth_username->text())); + strlist.insert("Xauth username", QString(_vpncWidget->Xauth_username->text())); if (_vpncWidget->chkUseDomain->isChecked()) - strlist.insert("Domain", QDBusData::fromString(_vpncWidget->Domain->text())); + strlist.insert("Domain", QString(_vpncWidget->Domain->text())); if (_vpncWidget->chkUseKeepAlive->isChecked()) - strlist.insert("NAT-Keepalive packet interval", QDBusData::fromString(_vpncWidget->nat_keep_alive_interval->text())); + strlist.insert("NAT-Keepalive packet interval", QString(_vpncWidget->nat_keep_alive_interval->text())); - strlist.insert("Disable NAT Traversal", QDBusData::fromBool(_vpncWidget->chkDisableNatTraversal->isChecked())); - strlist.insert("Enable Single DES", QDBusData::fromBool(_vpncWidget->chkSingleDES->isChecked())); + strlist.insert("Disable NAT Traversal", QString::number(_vpncWidget->chkDisableNatTraversal->isChecked())); + strlist.insert("Enable Single DES", QString::number(_vpncWidget->chkSingleDES->isChecked())); return strlist; } @@ -206,10 +206,10 @@ } -QMap<QString, QDBusData> VPNCAuthentication::getPasswords() +QMap<QString, QString> VPNCAuthentication::getPasswords() { - QMap<QString, QDBusData> pwds; - pwds.insert("IPSec secret", QDBusData::fromString(_vpncAuth->editGroupPassword->password())); - pwds.insert("Xauth password", QDBusData::fromString(_vpncAuth->editUserPassword->password())); + QMap<QString, QString> pwds; + pwds.insert("IPSec secret", QString(_vpncAuth->editGroupPassword->password())); + pwds.insert("Xauth password", QString(_vpncAuth->editUserPassword->password())); return pwds; } diff -ur BUILD/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/vpnc/src/knetworkmanager-vpnc.h BUILD2/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/vpnc/src/knetworkmanager-vpnc.h --- BUILD/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/vpnc/src/knetworkmanager-vpnc.h 2008-08-18 08:19:15.000000000 +0200 +++ BUILD2/knetworkmanager-0.7r848570/knetworkmanager/vpn-plugins/vpnc/src/knetworkmanager-vpnc.h 2008-09-25 13:58:30.000000000 +0200 @@ -49,8 +49,8 @@ { Q_OBJECT public: - void setVPNData(const QStringList& routes, const QMap<QString, QDBusData>& properties); - QMap<QString, QDBusData> getVPNProperties(); + void setVPNData(const QStringList& routes, const QMap<QString, QString>& properties); + QMap<QString, QString> getVPNProperties(); QStringList getVPNRoutes(); bool hasChanged(); bool isValid(QStringList& ); @@ -71,7 +71,7 @@ public: VPNCAuthentication(QWidget* parent = NULL, char* name = NULL); ~VPNCAuthentication(); - QMap<QString, QDBusData> getPasswords(); + QMap<QString, QString> getPasswords(); private: VPNCAuthenticationWidget* _vpncAuth;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor