Browse Source

Restrict QLocalServer access

The default is world access which means even even unprivileged local
accounts can connect to it too.
adaptive-webui-19844
Chocobo1 5 years ago
parent
commit
46ee193cd8
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 1
      src/app/qtsingleapplication/qtlocalpeer.cpp

1
src/app/qtsingleapplication/qtlocalpeer.cpp

@ -101,6 +101,7 @@ QtLocalPeer::QtLocalPeer(QObject* parent, const QString &appId)
#endif #endif
server = new QLocalServer(this); server = new QLocalServer(this);
server->setSocketOptions(QLocalServer::UserAccessOption);
QString lockName = QDir(QDir::tempPath()).absolutePath() QString lockName = QDir(QDir::tempPath()).absolutePath()
+ QLatin1Char('/') + socketName + QLatin1Char('/') + socketName
+ QLatin1String("-lockfile"); + QLatin1String("-lockfile");

Loading…
Cancel
Save