diff --git a/src/util/externalcommand.cpp b/src/util/externalcommand.cpp index 6b51017..caa4c2c 100644 --- a/src/util/externalcommand.cpp +++ b/src/util/externalcommand.cpp @@ -141,8 +141,7 @@ bool ExternalCommand::start(int timeout) CoreBackendManager::self()->privateKey().signMessage(hash, QCA::EMSA3_Raw), cmd, args(), - d->m_Input, - QStringList()); + d->m_Input); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(pcall, this); diff --git a/src/util/externalcommandhelper.cpp b/src/util/externalcommandhelper.cpp index 1f7f14b..02b388c 100644 --- a/src/util/externalcommandhelper.cpp +++ b/src/util/externalcommandhelper.cpp @@ -26,9 +26,6 @@ #include -// exit helper if no ping for 42s -#define TIMEOUT 42000 - /** Initialize ExternalCommandHelper Daemon and prepare DBus interface */ ActionReply ExternalCommandHelper::init(const QVariantMap& args) @@ -198,8 +195,9 @@ bool ExternalCommandHelper::copyblocks(const QString& Uuid, const QString& sourc return rval; } -QVariantMap ExternalCommandHelper::start(const QByteArray& signature, const QString& command, const QStringList& arguments, const QByteArray& input, const QStringList& environment) +QVariantMap ExternalCommandHelper::start(const QByteArray& signature, const QString& command, const QStringList& arguments, const QByteArray& input) { + QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8")); QVariantMap reply; QByteArray request; @@ -217,7 +215,7 @@ QVariantMap ExternalCommandHelper::start(const QByteArray& signature, const QStr // connect(&cmd, &QProcess::readyReadStandardOutput, this, &ExternalCommandHelper::onReadOutput); - m_cmd.setEnvironment(environment); + m_cmd.setEnvironment( { QStringLiteral("LVM_SUPPRESS_FD_WARNINGS=1") } ); m_cmd.start(command, arguments); m_cmd.write(input); m_cmd.closeWriteChannel(); diff --git a/src/util/externalcommandhelper.h b/src/util/externalcommandhelper.h index 05d48c1..4795399 100644 --- a/src/util/externalcommandhelper.h +++ b/src/util/externalcommandhelper.h @@ -43,7 +43,7 @@ public: public Q_SLOTS: ActionReply init(const QVariantMap& args); - Q_SCRIPTABLE QVariantMap start(const QByteArray& signature, const QString& command, const QStringList& arguments, const QByteArray& input, const QStringList& environment); + Q_SCRIPTABLE QVariantMap start(const QByteArray& signature, const QString& command, const QStringList& arguments, const QByteArray& input); Q_SCRIPTABLE bool copyblocks(const QString& Uuid, const QString& sourceDevice, const qint64 sourceFirstByte, const qint64 sourceLength, const QString& targetDevice, const qint64 targetFirstByte, const qint64 blockSize); Q_SCRIPTABLE void exit(const QString& Uuid);