Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[settings-vpn] Remove hardcoded user and move under privileged system…
… data. Contributes to JB#39282
  • Loading branch information
rainemak committed Apr 16, 2018
1 parent 3fa10cf commit 1dc122a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/vpnmodel.cpp
Expand Up @@ -35,6 +35,7 @@
#include "connmanvpnconnectionproxy.h"
#include "connmanserviceproxy.h"

#include <QStandardPaths>
#include <QCryptographicHash>
#include <QDBusPendingCallWatcher>
#include <QDBusServiceWatcher>
Expand Down Expand Up @@ -315,7 +316,7 @@ QVariantMap VpnModel::CredentialsRepository::decodeCredentials(const QByteArray
VpnModel::VpnModel(QObject *parent)
: ObjectListModel(parent, true, false)
, connmanVpn_(connmanVpnService, "/", QDBusConnection::systemBus(), this)
, credentials_("/home/nemo/.local/share/system/vpn-data")
, credentials_(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/system/privileged/vpn-data"))
, bestState_(VpnModel::Idle)
{
qDBusRegisterMetaType<PathProperties>();
Expand Down Expand Up @@ -897,8 +898,7 @@ QVariantMap VpnModel::processOpenVpnProvisioningFile(QFile &provisioningFile)
const QRegularExpression embeddedLeader(QStringLiteral("^\\s*<([^\\/>]+)>"));
const QRegularExpression embeddedTrailer(QStringLiteral("^\\s*<\\/([^\\/>]+)>"));
const QRegularExpression whitespace(QStringLiteral("\\s"));

const QString outputPath("/home/nemo/.local/share/system/vpn-provisioning");
const QString outputPath(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/system/privileged/vpn-provisioning"));

auto normaliseProtocol = [](const QString &proto) {
if (proto == QStringLiteral("tcp")) {
Expand Down

0 comments on commit 1dc122a

Please sign in to comment.