Commit 55f003e0 authored by pvuorela's avatar pvuorela

Merge branch 'master' into 'master'

Reformat code to common style and fix some small issues

See individual commits

@sage @rainemak

See merge request !6
parents a470b9b0 3321d4a1
......@@ -19,9 +19,9 @@ public:
* A list of types ssu provides shiny values suitable for displaying
*/
enum DisplayType {
DeviceManufacturer = Ssu::DeviceManufacturer, ///< Manufacturer, like ACME Corp. Board mappings key "deviceManufacturer"
DeviceModel = Ssu::DeviceModel, ///< Marketed device name, like Pogoblaster 3000. Board mappings key "prettyModel"
DeviceDesignation = Ssu::DeviceDesignation, ///< Type designation, like NCC-1701. Beard mappings key "deviceDesignation"
DeviceManufacturer = Ssu::DeviceManufacturer, ///< Manufacturer, like ACME Corp. Board mappings key "deviceManufacturer"
DeviceModel = Ssu::DeviceModel, ///< Marketed device name, like Pogoblaster 3000. Board mappings key "prettyModel"
DeviceDesignation = Ssu::DeviceDesignation, ///< Type designation, like NCC-1701. Beard mappings key "deviceDesignation"
};
DeclarativeSsuDeviceInfo();
......@@ -37,7 +37,7 @@ public:
* If the device is not a variant it will return an empty string. If
* fallback is set to true it return the device model in this case.
*/
Q_INVOKABLE QString deviceVariant(bool fallback=false);
Q_INVOKABLE QString deviceVariant(bool fallback = false);
/**
* Try to find out ond what kind of system this is running
*/
......
......@@ -56,80 +56,86 @@
Sandbox *Sandbox::s_activeInstance = 0;
Sandbox::Sandbox()
: m_defaultConstructed(true), m_usage(UseDirectly), m_scopes(ThisProcess),
m_sandboxPath(QProcessEnvironment::systemEnvironment().value("SSU_SANDBOX_DIR")),
m_prepared(false){
if (!activate()){
qFatal("%s: Failed to activate", Q_FUNC_INFO);
}
: m_defaultConstructed(true), m_usage(UseDirectly), m_scopes(ThisProcess),
m_sandboxPath(QProcessEnvironment::systemEnvironment().value("SSU_SANDBOX_DIR")),
m_prepared(false)
{
if (!activate()) {
qFatal("%s: Failed to activate", Q_FUNC_INFO);
}
}
Sandbox::Sandbox(const QString &sandboxPath, Usage usage, Scopes scopes)
: m_defaultConstructed(false), m_usage(usage), m_scopes(scopes),
m_sandboxPath(sandboxPath), m_prepared(false){
Q_ASSERT(!sandboxPath.isEmpty());
: m_defaultConstructed(false), m_usage(usage), m_scopes(scopes),
m_sandboxPath(sandboxPath), m_prepared(false)
{
Q_ASSERT(!sandboxPath.isEmpty());
}
Sandbox::~Sandbox(){
if (isActive()){
deactivate();
}
Sandbox::~Sandbox()
{
if (isActive()) {
deactivate();
}
if (!m_tempDir.isEmpty() && QFileInfo(m_tempDir).exists()){
if (QProcess::execute("rm", QStringList() << "-rf" << m_tempDir) != 0){
qWarning("%s: Failed to remove temporary directory", Q_FUNC_INFO);
if (!m_tempDir.isEmpty() && QFileInfo(m_tempDir).exists()) {
if (QProcess::execute("rm", QStringList() << "-rf" << m_tempDir) != 0) {
qWarning("%s: Failed to remove temporary directory", Q_FUNC_INFO);
}
}
}
}
bool Sandbox::isActive() const{
return s_activeInstance == this;
bool Sandbox::isActive() const
{
return s_activeInstance == this;
}
bool Sandbox::activate(){
Q_ASSERT_X(s_activeInstance == 0, Q_FUNC_INFO, "Only one instance can be active!");
bool Sandbox::activate()
{
Q_ASSERT_X(s_activeInstance == 0, Q_FUNC_INFO, "Only one instance can be active!");
if (!prepare()){
return false;
}
if (!prepare()) {
return false;
}
if (m_scopes & ChildProcesses){
setenv("SSU_SANDBOX_DIR", qPrintable(m_workingSandboxDir.path()), 1);
}
if (m_scopes & ChildProcesses) {
setenv("SSU_SANDBOX_DIR", qPrintable(m_workingSandboxDir.path()), 1);
}
s_activeInstance = this;
return true;
s_activeInstance = this;
return true;
}
void Sandbox::deactivate(){
Q_ASSERT(isActive());
void Sandbox::deactivate()
{
Q_ASSERT(isActive());
if (m_scopes & ChildProcesses){
unsetenv("SSU_SANDBOX_DIR");
}
if (m_scopes & ChildProcesses) {
unsetenv("SSU_SANDBOX_DIR");
}
s_activeInstance = 0;
s_activeInstance = 0;
}
QDir Sandbox::effectiveRootDir()
{
return s_activeInstance != 0 && s_activeInstance->m_scopes & ThisProcess
? s_activeInstance->m_workingSandboxDir
: QDir::root();
return s_activeInstance != 0 && s_activeInstance->m_scopes & ThisProcess
? s_activeInstance->m_workingSandboxDir
: QDir::root();
}
QString Sandbox::map(const QString &fileName)
{
return effectiveRootDir().filePath(
QDir::root().relativeFilePath(
QFileInfo(fileName).absoluteFilePath()));
return effectiveRootDir().filePath(
QDir::root().relativeFilePath(
QFileInfo(fileName).absoluteFilePath()));
}
QString Sandbox::map(const QString &pathName, const QString &fileName)
{
return effectiveRootDir().filePath(
QDir::root().relativeFilePath(
QFileInfo(pathName + fileName).absoluteFilePath()));
return effectiveRootDir().filePath(
QDir::root().relativeFilePath(
QFileInfo(pathName + fileName).absoluteFilePath()));
}
/**
......@@ -138,184 +144,189 @@ QString Sandbox::map(const QString &pathName, const QString &fileName)
* @c QDir::NoDotAndDotDot is always added into @a filters.
*/
bool Sandbox::addWorldFiles(const QString &directory, QDir::Filters filters,
const QStringList &filterNames, bool recurse){
Q_ASSERT(!isActive());
Q_ASSERT(!directory.isEmpty());
if (!prepare()){
return false;
}
const QString sandboxedDirectory = m_workingSandboxDir.filePath(
QDir::root().relativeFilePath(
QFileInfo(directory).absoluteFilePath()));
if (!QFileInfo(directory).exists()){
// Accept missing world directory - allow to create directories inside sandbox
qDebug("%s: Directory does not exist - an empty one will be created instead of copied: '%s'",
Q_FUNC_INFO, qPrintable(directory));
} else if (!QFileInfo(directory).isDir()){
qWarning("%s: Is not a directory: '%s'", Q_FUNC_INFO, qPrintable(directory));
return false;
}
if (!QFileInfo(sandboxedDirectory).exists()){
if (!QDir().mkpath(sandboxedDirectory)){
qWarning("%s: Failed to create sandbox directory '%s'", Q_FUNC_INFO,
qPrintable(sandboxedDirectory));
return false;
const QStringList &filterNames, bool recurse)
{
Q_ASSERT(!isActive());
Q_ASSERT(!directory.isEmpty());
if (!prepare()) {
return false;
}
} else if (!QFileInfo(sandboxedDirectory).isDir()){
qWarning("%s: Failed to create sandbox directory '%s': Is not a directory", Q_FUNC_INFO,
qPrintable(sandboxedDirectory));
return false;
}
if (filters == QDir::NoFilter){
filters = QDir::AllEntries;
}
const QString sandboxedDirectory = m_workingSandboxDir.filePath(
QDir::root().relativeFilePath(
QFileInfo(directory).absoluteFilePath()));
filters |= QDir::NoDotAndDotDot;
if (!QFileInfo(directory).exists()) {
// Accept missing world directory - allow to create directories inside sandbox
qDebug("%s: Directory does not exist - an empty one will be created instead of copied: '%s'",
Q_FUNC_INFO, qPrintable(directory));
} else if (!QFileInfo(directory).isDir()) {
qWarning("%s: Is not a directory: '%s'", Q_FUNC_INFO, qPrintable(directory));
return false;
}
foreach (const QFileInfo &worldEntryInfo, QDir(directory).entryInfoList(filterNames, filters)){
if (!QFileInfo(sandboxedDirectory).exists()) {
if (!QDir().mkpath(sandboxedDirectory)) {
qWarning("%s: Failed to create sandbox directory '%s'", Q_FUNC_INFO,
qPrintable(sandboxedDirectory));
return false;
}
} else if (!QFileInfo(sandboxedDirectory).isDir()) {
qWarning("%s: Failed to create sandbox directory '%s': Is not a directory", Q_FUNC_INFO,
qPrintable(sandboxedDirectory));
return false;
}
const QFileInfo sandboxEntryInfo(QDir(sandboxedDirectory).filePath(worldEntryInfo.fileName()));
if (filters == QDir::NoFilter) {
filters = QDir::AllEntries;
}
if (worldEntryInfo.isDir()){
if (!sandboxEntryInfo.exists()){
if (!QDir(sandboxedDirectory).mkdir(worldEntryInfo.fileName())){
qWarning("%s: Failed to create overlay directory '%s/%s'", Q_FUNC_INFO,
qPrintable(sandboxedDirectory), qPrintable(worldEntryInfo.fileName()));
return false;
}
} else if (!sandboxEntryInfo.isDir()){
qWarning("%s: Failed to create sandboxed copy '%s': Is not a directory", Q_FUNC_INFO,
qPrintable(sandboxEntryInfo.filePath()));
return false;
}
if (recurse){
if (!addWorldFiles(worldEntryInfo.absoluteFilePath(), filters, filterNames, true)){
return false;
}
}
} else{
if (!sandboxEntryInfo.exists()){
if (!QFile(worldEntryInfo.filePath()).copy(sandboxEntryInfo.filePath())){
qWarning("%s: Failed to copy file into sandbox '%s'", Q_FUNC_INFO,
qPrintable(worldEntryInfo.filePath()));
return false;
filters |= QDir::NoDotAndDotDot;
foreach (const QFileInfo &worldEntryInfo, QDir(directory).entryInfoList(filterNames, filters)) {
const QFileInfo sandboxEntryInfo(QDir(sandboxedDirectory).filePath(worldEntryInfo.fileName()));
if (worldEntryInfo.isDir()) {
if (!sandboxEntryInfo.exists()) {
if (!QDir(sandboxedDirectory).mkdir(worldEntryInfo.fileName())) {
qWarning("%s: Failed to create overlay directory '%s/%s'", Q_FUNC_INFO,
qPrintable(sandboxedDirectory), qPrintable(worldEntryInfo.fileName()));
return false;
}
} else if (!sandboxEntryInfo.isDir()) {
qWarning("%s: Failed to create sandboxed copy '%s': Is not a directory", Q_FUNC_INFO,
qPrintable(sandboxEntryInfo.filePath()));
return false;
}
if (recurse) {
if (!addWorldFiles(worldEntryInfo.absoluteFilePath(), filters, filterNames, true)) {
return false;
}
}
} else {
if (!sandboxEntryInfo.exists()) {
if (!QFile(worldEntryInfo.filePath()).copy(sandboxEntryInfo.filePath())) {
qWarning("%s: Failed to copy file into sandbox '%s'", Q_FUNC_INFO,
qPrintable(worldEntryInfo.filePath()));
return false;
}
} else if (sandboxEntryInfo.isDir()) {
qWarning("%s: Failed to create sandboxed copy '%s': Is a directory", Q_FUNC_INFO,
qPrintable(sandboxEntryInfo.filePath()));
return false;
}
}
} else if (sandboxEntryInfo.isDir()){
qWarning("%s: Failed to create sandboxed copy '%s': Is a directory", Q_FUNC_INFO,
qPrintable(sandboxEntryInfo.filePath()));
return false;
}
}
}
return true;
return true;
}
bool Sandbox::addWorldFile(const QString &file){
return addWorldFiles(QFileInfo(file).path(), QDir::NoFilter,
QStringList() << QFileInfo(file).fileName());
bool Sandbox::addWorldFile(const QString &file)
{
return addWorldFiles(QFileInfo(file).path(), QDir::NoFilter,
QStringList() << QFileInfo(file).fileName());
}
bool Sandbox::prepare(){
Q_ASSERT(m_defaultConstructed || !m_sandboxPath.isEmpty());
if (m_prepared){
return true;
}
bool Sandbox::prepare()
{
Q_ASSERT(m_defaultConstructed || !m_sandboxPath.isEmpty());
if (m_sandboxPath.isEmpty()){
return true;
}
if (!QFileInfo(m_sandboxPath).exists()){
qWarning("%s: Invalid sandboxPath: No such file or directory", qPrintable(m_sandboxPath));
return false;
}
if (!QFileInfo(m_sandboxPath).isDir()){
qWarning("%s: Invalid sandboxPath: Not a directory", qPrintable(m_sandboxPath));
return false;
}
if (m_usage == UseAsSkeleton){
if (m_tempDir = createTmpDir("ssu-sandbox.%1"), m_tempDir.isEmpty()){
qWarning("%s: Failed to create sandbox directory", Q_FUNC_INFO);
return false;
if (m_prepared) {
return true;
}
const QString sandboxCopyPath = QDir(m_tempDir).filePath("configroot");
if (m_sandboxPath.isEmpty()) {
return true;
}
if (!copyDir(m_sandboxPath, sandboxCopyPath)){
qWarning("%s: Failed to copy sandbox directory", Q_FUNC_INFO);
return false;
if (!QFileInfo(m_sandboxPath).exists()) {
qWarning("%s: Invalid sandboxPath: No such file or directory", qPrintable(m_sandboxPath));
return false;
}
m_workingSandboxDir = QDir(sandboxCopyPath);
} else{
m_workingSandboxDir = QDir(m_sandboxPath);
}
if (!QFileInfo(m_sandboxPath).isDir()) {
qWarning("%s: Invalid sandboxPath: Not a directory", qPrintable(m_sandboxPath));
return false;
}
m_prepared = true;
return true;
}
if (m_usage == UseAsSkeleton) {
if (m_tempDir = createTmpDir("ssu-sandbox.%1"), m_tempDir.isEmpty()) {
qWarning("%s: Failed to create sandbox directory", Q_FUNC_INFO);
return false;
}
QString Sandbox::createTmpDir(const QString &nameTemplate){
static const int REASONABLE_REPEAT_COUNT = 10;
const QString sandboxCopyPath = QDir(m_tempDir).filePath("configroot");
for (int i = 0; i < REASONABLE_REPEAT_COUNT; ++i){
QString path;
int suffix = 0;
do{
path = QDir::temp().filePath(nameTemplate.arg(++suffix));
}while(QFileInfo(path).exists());
if (!copyDir(m_sandboxPath, sandboxCopyPath)) {
qWarning("%s: Failed to copy sandbox directory", Q_FUNC_INFO);
return false;
}
if (QDir().mkpath(path)){
return path;
m_workingSandboxDir = QDir(sandboxCopyPath);
} else {
m_workingSandboxDir = QDir(m_sandboxPath);
}
}
qWarning("%s: Failed to create temporary directory", Q_FUNC_INFO);
return QString();
m_prepared = true;
return true;
}
bool Sandbox::copyDir(const QString &directory, const QString &newName){
const QDir sourceRoot(directory);
const QDir destinationRoot(newName);
QString Sandbox::createTmpDir(const QString &nameTemplate)
{
static const int REASONABLE_REPEAT_COUNT = 10;
QDirIterator it(directory, QDir::AllEntries|QDir::NoDotAndDotDot, QDirIterator::Subdirectories);
while (it.hasNext()){
it.next();
for (int i = 0; i < REASONABLE_REPEAT_COUNT; ++i) {
QString path;
int suffix = 0;
do {
path = QDir::temp().filePath(nameTemplate.arg(++suffix));
} while (QFileInfo(path).exists());
const QFileInfo destination = QFileInfo(destinationRoot.filePath(
sourceRoot.relativeFilePath(it.filePath())));
if (QDir().mkpath(path)) {
return path;
}
}
if (it.fileInfo().isDir()){
if (!QDir().mkpath(destination.absoluteFilePath())){
qWarning("%s: Failed to mkpath '%s'", Q_FUNC_INFO, qPrintable(destination.absolutePath()));
return false;
}
} else if (it.fileInfo().isFile()){
if (!QDir().mkpath(destination.absolutePath())){
qWarning("%s: Failed to mkpath '%s'", Q_FUNC_INFO, qPrintable(destination.absolutePath()));
return false;
}
qWarning("%s: Failed to create temporary directory", Q_FUNC_INFO);
return QString();
}
if (!QFile::copy(it.fileInfo().absoluteFilePath(), destination.absoluteFilePath())){
qWarning("%s: Failed to copy file '%s'", Q_FUNC_INFO, qPrintable(it.filePath()));
return false;
}
} else{
qWarning("%s: Cannot copy other than regular files: '%s'", Q_FUNC_INFO,
qPrintable(it.filePath()));
return false;
bool Sandbox::copyDir(const QString &directory, const QString &newName)
{
const QDir sourceRoot(directory);
const QDir destinationRoot(newName);
QDirIterator it(directory, QDir::AllEntries | QDir::NoDotAndDotDot, QDirIterator::Subdirectories);
while (it.hasNext()) {
it.next();
const QFileInfo destination = QFileInfo(destinationRoot.filePath(
sourceRoot.relativeFilePath(it.filePath())));
if (it.fileInfo().isDir()) {
if (!QDir().mkpath(destination.absoluteFilePath())) {
qWarning("%s: Failed to mkpath '%s'", Q_FUNC_INFO, qPrintable(destination.absolutePath()));
return false;
}
} else if (it.fileInfo().isFile()) {
if (!QDir().mkpath(destination.absolutePath())) {
qWarning("%s: Failed to mkpath '%s'", Q_FUNC_INFO, qPrintable(destination.absolutePath()));
return false;
}
if (!QFile::copy(it.fileInfo().absoluteFilePath(), destination.absoluteFilePath())) {
qWarning("%s: Failed to copy file '%s'", Q_FUNC_INFO, qPrintable(it.filePath()));
return false;
}
} else {
qWarning("%s: Cannot copy other than regular files: '%s'", Q_FUNC_INFO,
qPrintable(it.filePath()));
return false;
}
}
}
return true;
return true;
}
......@@ -18,20 +18,21 @@
getenv("SSU_TESTS_DATA_PATH") : \
TESTS_DATA_PATH)
class Sandbox {
public:
class Sandbox
{
public:
enum Usage {
UseDirectly,
UseAsSkeleton,
UseDirectly,
UseAsSkeleton,
};
enum Scope {
ThisProcess = 0x01,
ChildProcesses = 0x02,
ThisProcess = 0x01,
ChildProcesses = 0x02,
};
Q_DECLARE_FLAGS(Scopes, Scope)
public:
public:
Sandbox();
Sandbox(const QString &sandboxPath, Usage usage, Scopes scopes);
~Sandbox();
......@@ -45,15 +46,15 @@ class Sandbox {
static QString map(const QString &pathName, const QString &fileName);
bool addWorldFiles(const QString &directory, QDir::Filters filters = QDir::NoFilter,
const QStringList &filterNames = QStringList(), bool recurse = true);
const QStringList &filterNames = QStringList(), bool recurse = true);
bool addWorldFile(const QString &file);
private:
private:
bool prepare();
static QString createTmpDir(const QString &nameTemplate);
static bool copyDir(const QString &directory, const QString &newName);
private:
private:
static Sandbox *s_activeInstance;
const bool m_defaultConstructed;
const Usage m_usage;
......
......@@ -10,10 +10,7 @@
#include <QDBusConnection>
#include <QDBusMessage>
#include <QDBusPendingReply>
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
#include <QUrlQuery>
#endif
#include <getdef.h>
#include <pwd.h>
......@@ -32,668 +29,675 @@
#define SSU_NETWORK_REQUEST_DOMAIN_DATA (static_cast<QNetworkRequest::Attribute>(QNetworkRequest::User + 1))
static void restoreUid(){
if (getuid() == 0){
seteuid(0);
setegid(0);
}
static void restoreUid()
{
if (getuid() == 0) {
seteuid(0);
setegid(0);
}
}
Ssu::Ssu(): QObject(){
errorFlag = false;
pendingRequests = 0;
Ssu::Ssu(): QObject()
{
errorFlag = false;
pendingRequests = 0;
#ifdef SSUCONFHACK
// dirty hack to make sure we can write to the configuration
// this is currently required since there's no global gconf,
// and we migth not yet have users on bootstrap
QFileInfo settingsInfo(SSU_CONFIGURATION);
if (settingsInfo.groupId() != SSU_GROUP_ID ||
!settingsInfo.permission(QFile::WriteGroup)){
QProcess proc;
proc.start("/usr/bin/ssuconfperm");
proc.waitForFinished();
}
// dirty hack to make sure we can write to the configuration
// this is currently required since there's no global gconf,
// and we migth not yet have users on bootstrap
QFileInfo settingsInfo(SSU_CONFIGURATION);
if (settingsInfo.groupId() != SSU_GROUP_ID ||
!settingsInfo.permission(QFile::WriteGroup)) {
QProcess proc;
proc.start("/usr/bin/ssuconfperm");
proc.waitForFinished();
}
#endif
SsuCoreConfig *settings = SsuCoreConfig::instance();
SsuCoreConfig *settings = SsuCoreConfig::instance();
#ifdef TARGET_ARCH
if (!settings->contains("arch"))
settings->setValue("arch", TARGET_ARCH);
if (!settings->contains("arch"))
settings->setValue("arch", TARGET_ARCH);
#else
// FIXME, try to guess a matching architecture
#warning "TARGET_ARCH not defined"
#endif
settings->sync();
settings->sync();
manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply *)),
SLOT(requestFinished(QNetworkReply *)));
manager = new QNetworkAccessManager(this);
connect(manager, SIGNAL(finished(QNetworkReply *)),
SLOT(requestFinished(QNetworkReply *)));
}
// FIXME, the whole credentials stuff needs reworking
// should probably be part of repo handling instead of core configuration
QPair<QString, QString> Ssu::credentials(QString scope){
SsuCoreConfig *settings = SsuCoreConfig::instance();
return settings->credentials(scope);
QPair<QString, QString> Ssu::credentials(QString scope)
{
SsuCoreConfig *settings = SsuCoreConfig::instance();
return settings->credentials(scope);
}
QString Ssu::credentialsScope(QString repoName, bool rndRepo){
SsuCoreConfig *settings = SsuCoreConfig::instance();
SsuSettings repoSettings(SSU_REPO_CONFIGURATION, QSettings::IniFormat);
// hardcoded magic for doing special privileges store repositories
if (repoName == "store" || repoName.startsWith("store-c-"))
return "store";
// check if some repos are marked for using store-credentials
// in current domain, checking first for rnd/release specific
// settings, and if not found in generic settings
QString storeAuthReposKey = QString("store-auth-repos-%1")
.arg(rndRepo ? "rnd" : "release");
QStringList storeAuthRepos =
SsuVariables::variable(&repoSettings,
domain() + "-domain",
storeAuthReposKey).toStringList();
if (storeAuthRepos.empty())
storeAuthRepos =
SsuVariables::variable(&repoSettings,
domain() + "-domain",
"store-auth-repos").toStringList();
if (storeAuthRepos.contains(repoName))
return "store";
// If we defined explicitly what credentials to use with which secure domain
// use those.
QHash<QString, QString> secureDomainAuth;
SsuVariables::variableSection(&repoSettings, "secure-domain-auth", &secureDomainAuth);
QHashIterator<QString, QString> i(secureDomainAuth);
while (i.hasNext()) {
i.next();
if (repoUrl(repoName, rndRepo).contains(i.key()) && !i.value().isEmpty()) {
return i.value();
QString Ssu::credentialsScope(QString repoName, bool rndRepo)
{
SsuCoreConfig *settings = SsuCoreConfig::instance();
SsuSettings repoSettings(SSU_REPO_CONFIGURATION, QSettings::IniFormat);
// hardcoded magic for doing special privileges store repositories
if (repoName == "store" || repoName.startsWith("store-c-"))
return "store";
// check if some repos are marked for using store-credentials
// in current domain, checking first for rnd/release specific
// settings, and if not found in generic settings
QString storeAuthReposKey = QString("store-auth-repos-%1")
.arg(rndRepo ? "rnd" : "release");
QStringList storeAuthRepos =
SsuVariables::variable(&repoSettings,
domain() + "-domain",
storeAuthReposKey).toStringList();
if (storeAuthRepos.empty())
storeAuthRepos =
SsuVariables::variable(&repoSettings,
domain() + "-domain",
"store-auth-repos").toStringList();
if (storeAuthRepos.contains(repoName))
return "store";