summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Freydank <holgersson@posteo.de>2017-12-16 13:21:00 +0100
committerMichael Palimaka <kensington@gentoo.org>2017-12-17 00:04:08 +1100
commitc1bf84e15d16a7260f31b47234a329705d162eda (patch)
tree1b4a12cd69447e36256ec11d1389192bf119c97d /kde-plasma
parentkde-frameworks/networkmanager-qt: Add EAP-PWD support. (diff)
downloadgentoo-c1bf84e15d16a7260f31b47234a329705d162eda.tar.gz
gentoo-c1bf84e15d16a7260f31b47234a329705d162eda.tar.bz2
gentoo-c1bf84e15d16a7260f31b47234a329705d162eda.zip
kde-plasma/plasma-nm: Add EAP-PWD support.
Wrt upstream bug https://bugs.kde.org/show_bug.cgi?id=387685. Closes: https://github.com/gentoo/gentoo/pull/6565 Package-Manager: Portage-2.3.18, Repoman-2.3.6
Diffstat (limited to 'kde-plasma')
-rw-r--r--kde-plasma/plasma-nm/files/plasma-nm-add_EAP-PWD.patch201
-rw-r--r--kde-plasma/plasma-nm/plasma-nm-5.11.4-r1.ebuild67
2 files changed, 268 insertions, 0 deletions
diff --git a/kde-plasma/plasma-nm/files/plasma-nm-add_EAP-PWD.patch b/kde-plasma/plasma-nm/files/plasma-nm-add_EAP-PWD.patch
new file mode 100644
index 000000000000..896a8144d52d
--- /dev/null
+++ b/kde-plasma/plasma-nm/files/plasma-nm-add_EAP-PWD.patch
@@ -0,0 +1,201 @@
+From b98333458ca1edd1cafb2a5b83d45f46faf14103 Mon Sep 17 00:00:00 2001
+From: Jan Grulich <jgrulich@redhat.com>
+Date: Wed, 13 Dec 2017 08:51:06 +0100
+Subject: 802-1x: Add support for EAP-PWD
+
+BUG:387685
+---
+ libs/editor/settings/security802-1x.cpp | 49 +++++++++++++++++++++++++++++----
+ libs/editor/settings/ui/802-1x.ui | 49 +++++++++++++++++++++++++++++----
+ 3 files changed, 88 insertions(+), 12 deletions(-)
+
+diff --git a/libs/editor/settings/security802-1x.cpp b/libs/editor/settings/security802-1x.cpp
+index d6405bf..461a38c 100644
+--- a/libs/editor/settings/security802-1x.cpp
++++ b/libs/editor/settings/security802-1x.cpp
+@@ -40,6 +40,7 @@ Security8021x::Security8021x(const NetworkManager::Setting::Ptr &setting, bool w
+ m_ui->leapPassword->setPasswordOptionsEnabled(true);
+ m_ui->md5Password->setPasswordOptionsEnabled(true);
+ m_ui->peapPassword->setPasswordOptionsEnabled(true);
++ m_ui->pwdPassword->setPasswordOptionsEnabled(true);
+ m_ui->tlsPrivateKeyPassword->setPasswordOptionsEnabled(true);
+ m_ui->ttlsPassword->setPasswordOptionsEnabled(true);
+
+@@ -49,18 +50,20 @@ Security8021x::Security8021x(const NetworkManager::Setting::Ptr &setting, bool w
+
+ m_ui->auth->setItemData(0, NetworkManager::Security8021xSetting::EapMethodTls);
+ m_ui->auth->setItemData(1, NetworkManager::Security8021xSetting::EapMethodLeap);
+- m_ui->auth->setItemData(2, NetworkManager::Security8021xSetting::EapMethodFast);
+- m_ui->auth->setItemData(3, NetworkManager::Security8021xSetting::EapMethodTtls);
+- m_ui->auth->setItemData(4, NetworkManager::Security8021xSetting::EapMethodPeap);
++ m_ui->auth->setItemData(2, NetworkManager::Security8021xSetting::EapMethodPwd);
++ m_ui->auth->setItemData(3, NetworkManager::Security8021xSetting::EapMethodFast);
++ m_ui->auth->setItemData(4, NetworkManager::Security8021xSetting::EapMethodTtls);
++ m_ui->auth->setItemData(5, NetworkManager::Security8021xSetting::EapMethodPeap);
+ } else {
+ m_ui->auth->removeItem(2); // LEAP
+ m_ui->stackedWidget->removeWidget(m_ui->leapPage);
+
+ m_ui->auth->setItemData(0, NetworkManager::Security8021xSetting::EapMethodMd5);
+ m_ui->auth->setItemData(1, NetworkManager::Security8021xSetting::EapMethodTls);
+- m_ui->auth->setItemData(2, NetworkManager::Security8021xSetting::EapMethodFast);
+- m_ui->auth->setItemData(3, NetworkManager::Security8021xSetting::EapMethodTtls);
+- m_ui->auth->setItemData(4, NetworkManager::Security8021xSetting::EapMethodPeap);
++ m_ui->auth->setItemData(2, NetworkManager::Security8021xSetting::EapMethodPwd);
++ m_ui->auth->setItemData(3, NetworkManager::Security8021xSetting::EapMethodFast);
++ m_ui->auth->setItemData(4, NetworkManager::Security8021xSetting::EapMethodTtls);
++ m_ui->auth->setItemData(5, NetworkManager::Security8021xSetting::EapMethodPeap);
+ }
+
+ // Set PEAP authentication as default
+@@ -88,6 +91,8 @@ Security8021x::Security8021x(const NetworkManager::Setting::Ptr &setting, bool w
+ connect(m_ui->leapPassword, &PasswordField::passwordOptionChanged, this, &Security8021x::slotWidgetChanged);
+ connect(m_ui->fastAllowPacProvisioning, &QCheckBox::stateChanged, this, &Security8021x::slotWidgetChanged);
+ connect(m_ui->pacFile, &KUrlRequester::textChanged, this, &Security8021x::slotWidgetChanged);
++ connect(m_ui->pwdUsername, &KLineEdit::textChanged, this, &Security8021x::slotWidgetChanged);
++ connect(m_ui->pwdPassword, &PasswordField::textChanged, this, &Security8021x::slotWidgetChanged);
+ connect(m_ui->fastUsername, &KLineEdit::textChanged, this, &Security8021x::slotWidgetChanged);
+ connect(m_ui->fastPassword, &PasswordField::textChanged, this, &Security8021x::slotWidgetChanged);
+ connect(m_ui->fastPassword, &PasswordField::passwordOptionChanged, this, &Security8021x::slotWidgetChanged);
+@@ -175,6 +180,18 @@ void Security8021x::loadConfig(const NetworkManager::Setting::Ptr &setting)
+ } else {
+ m_ui->leapPassword->setPasswordOption(PasswordField::AlwaysAsk);
+ }
++
++ } else if (eapMethods.contains(NetworkManager::Security8021xSetting::EapMethodPwd)) {
++ m_ui->auth->setCurrentIndex(m_ui->auth->findData(NetworkManager::Security8021xSetting::EapMethodPwd));
++ m_ui->pwdUsername->setText(securitySetting->identity());
++
++ if (securitySetting->passwordFlags().testFlag(NetworkManager::Setting::None)) {
++ m_ui->pwdPassword->setPasswordOption(PasswordField::StoreForAllUsers);
++ } else if (securitySetting->passwordFlags().testFlag(NetworkManager::Setting::AgentOwned)) {
++ m_ui->pwdPassword->setPasswordOption(PasswordField::StoreForUser);
++ } else {
++ m_ui->pwdPassword->setPasswordOption(PasswordField::AlwaysAsk);
++ }
+ } else if (eapMethods.contains(NetworkManager::Security8021xSetting::EapMethodFast)) {
+ m_ui->auth->setCurrentIndex(m_ui->auth->findData(NetworkManager::Security8021xSetting::EapMethodFast));
+ m_ui->fastAnonIdentity->setText(securitySetting->anonymousIdentity());
+@@ -256,6 +273,8 @@ void Security8021x::loadSecrets(const NetworkManager::Setting::Ptr &setting)
+ m_ui->leapPassword->setText(securitySetting->password());
+ } else if (eapMethods.contains(NetworkManager::Security8021xSetting::EapMethodFast)) {
+ m_ui->fastPassword->setText(securitySetting->password());
++ } else if (eapMethods.contains(NetworkManager::Security8021xSetting::EapMethodPwd)) {
++ m_ui->pwdPassword->setText(securitySetting->password());
+ } else if (eapMethods.contains(NetworkManager::Security8021xSetting::EapMethodTtls)) {
+ m_ui->ttlsPassword->setText(securitySetting->password());
+ } else if (eapMethods.contains(NetworkManager::Security8021xSetting::EapMethodPeap)) {
+@@ -366,6 +385,22 @@ QVariantMap Security8021x::setting() const
+ } else {
+ setting.setPasswordFlags(NetworkManager::Setting::NotSaved);
+ }
++ } else if (method == NetworkManager::Security8021xSetting::EapMethodPwd) {
++ if (!m_ui->pwdUsername->text().isEmpty()) {
++ setting.setIdentity(m_ui->pwdUsername->text());
++ }
++
++ if (m_ui->pwdPassword->passwordOption() == PasswordField::StoreForAllUsers) {
++ setting.setPasswordFlags(NetworkManager::Setting::None);
++ } else if (m_ui->pwdPassword->passwordOption() == PasswordField::StoreForUser) {
++ setting.setPasswordFlags(NetworkManager::Setting::AgentOwned);
++ } else {
++ setting.setPasswordFlags(NetworkManager::Setting::NotSaved);
++ }
++
++ if (!m_ui->pwdPassword->text().isEmpty()) {
++ setting.setPassword(m_ui->pwdPassword->text());
++ }
+ } else if (method == NetworkManager::Security8021xSetting::EapMethodFast) {
+ if (!m_ui->fastAnonIdentity->text().isEmpty()) {
+ setting.setAnonymousIdentity(m_ui->fastAnonIdentity->text());
+@@ -580,6 +615,8 @@ bool Security8021x::isValid() const
+ // TODO Validate other certificates??
+ } else if (method == NetworkManager::Security8021xSetting::EapMethodLeap) {
+ return !m_ui->leapUsername->text().isEmpty() && (!m_ui->leapPassword->text().isEmpty() || m_ui->leapPassword->passwordOption() == PasswordField::AlwaysAsk);
++ } else if (method == NetworkManager::Security8021xSetting::EapMethodPwd) {
++ return !m_ui->pwdUsername->text().isEmpty() && (!m_ui->pwdPassword->text().isEmpty() || m_ui->pwdPassword->passwordOption() == PasswordField::AlwaysAsk);
+ } else if (method == NetworkManager::Security8021xSetting::EapMethodFast) {
+ if (!m_ui->fastAllowPacProvisioning->isChecked() && !m_ui->pacFile->url().isValid()) {
+ return false;
+diff --git a/libs/editor/settings/ui/802-1x.ui b/libs/editor/settings/ui/802-1x.ui
+index aaa46fa..202cdf8 100644
+--- a/libs/editor/settings/ui/802-1x.ui
++++ b/libs/editor/settings/ui/802-1x.ui
+@@ -50,6 +50,11 @@
+ </item>
+ <item>
+ <property name="text">
++ <string>PWD</string>
++ </property>
++ </item>
++ <item>
++ <property name="text">
+ <string>FAST</string>
+ </property>
+ </item>
+@@ -298,6 +303,40 @@
+ </item>
+ </layout>
+ </widget>
++ <widget class="QWidget" name="pwdPage">
++ <layout class="QFormLayout" name="formLayout_8">
++ <item row="0" column="0">
++ <widget class="QLabel" name="label_33">
++ <property name="text">
++ <string>Username:</string>
++ </property>
++ <property name="buddy">
++ <cstring>md5UserName</cstring>
++ </property>
++ </widget>
++ </item>
++ <item row="0" column="1">
++ <widget class="KLineEdit" name="pwdUsername"/>
++ </item>
++ <item row="1" column="0">
++ <widget class="QLabel" name="label_34">
++ <property name="text">
++ <string>Password:</string>
++ </property>
++ <property name="buddy">
++ <cstring>md5Password</cstring>
++ </property>
++ </widget>
++ </item>
++ <item row="1" column="1">
++ <widget class="PasswordField" name="pwdPassword">
++ <property name="passwordModeEnabled" stdset="0">
++ <bool>true</bool>
++ </property>
++ </widget>
++ </item>
++ </layout>
++ </widget>
+ <widget class="QWidget" name="fastPage">
+ <layout class="QFormLayout" name="formLayout_4">
+ <item row="0" column="0">
+@@ -696,16 +735,16 @@
+ <header>kcombobox.h</header>
+ </customwidget>
+ <customwidget>
+- <class>KUrlRequester</class>
+- <extends>QWidget</extends>
+- <header>kurlrequester.h</header>
+- </customwidget>
+- <customwidget>
+ <class>KLineEdit</class>
+ <extends>QLineEdit</extends>
+ <header>klineedit.h</header>
+ </customwidget>
+ <customwidget>
++ <class>KUrlRequester</class>
++ <extends>QWidget</extends>
++ <header>kurlrequester.h</header>
++ </customwidget>
++ <customwidget>
+ <class>PasswordField</class>
+ <extends>QLineEdit</extends>
+ <header>passwordfield.h</header>
+--
+cgit v0.11.2
+
diff --git a/kde-plasma/plasma-nm/plasma-nm-5.11.4-r1.ebuild b/kde-plasma/plasma-nm/plasma-nm-5.11.4-r1.ebuild
new file mode 100644
index 000000000000..506a3897b4f8
--- /dev/null
+++ b/kde-plasma/plasma-nm/plasma-nm-5.11.4-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit kde5
+
+DESCRIPTION="KDE Plasma applet for NetworkManager"
+LICENSE="GPL-2 LGPL-2.1"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="modemmanager openconnect teamd"
+
+PATCHES=( "${FILESDIR}"/${PN}-add_EAP-PWD.patch )
+
+DEPEND="
+ $(add_frameworks_dep kcompletion)
+ $(add_frameworks_dep kconfig)
+ $(add_frameworks_dep kconfigwidgets)
+ $(add_frameworks_dep kcoreaddons)
+ $(add_frameworks_dep kdbusaddons)
+ $(add_frameworks_dep kdeclarative)
+ $(add_frameworks_dep kdelibs4support)
+ $(add_frameworks_dep ki18n)
+ $(add_frameworks_dep kiconthemes)
+ $(add_frameworks_dep kio)
+ $(add_frameworks_dep kitemviews)
+ $(add_frameworks_dep knotifications)
+ $(add_frameworks_dep kservice)
+ $(add_frameworks_dep kwallet)
+ $(add_frameworks_dep kwidgetsaddons)
+ $(add_frameworks_dep kwindowsystem)
+ $(add_frameworks_dep kxmlgui)
+ $(add_frameworks_dep networkmanager-qt 'teamd=')
+ $(add_frameworks_dep plasma)
+ $(add_frameworks_dep solid)
+ $(add_qt_dep qtdbus)
+ $(add_qt_dep qtdeclarative)
+ $(add_qt_dep qtgui)
+ $(add_qt_dep qtnetwork)
+ $(add_qt_dep qtwidgets)
+ >=app-crypt/qca-2.1.1:2[qt5]
+ >=net-misc/networkmanager-0.9.10.0[teamd=]
+ modemmanager? (
+ $(add_frameworks_dep modemmanager-qt)
+ $(add_qt_dep qtxml)
+ net-misc/mobile-broadband-provider-info
+ )
+ openconnect? (
+ $(add_qt_dep qtxml)
+ net-misc/networkmanager-openconnect
+ net-vpn/openconnect:=
+ )
+"
+RDEPEND="${DEPEND}
+ $(add_plasma_dep plasma-workspace)
+ !kde-plasma/plasma-nm:4
+"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_find_package modemmanager ModemManager)
+ $(cmake-utils_use_find_package modemmanager KF5ModemManagerQt)
+ $(cmake-utils_use_find_package openconnect OpenConnect)
+ )
+
+ kde5_src_configure
+}