From: Arvin Schnell Date: Tue, 13 Jun 2023 10:10:21 +0000 (+0200) Subject: - update qgroup in config info in snapperd when running setup-quota X-Git-Tag: v0.10.6~19^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F818%2Fhead;p=thirdparty%2Fsnapper.git - update qgroup in config info in snapperd when running setup-quota --- diff --git a/package/snapper.changes b/package/snapper.changes index 2dbe7652..5257eb52 100644 --- a/package/snapper.changes +++ b/package/snapper.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 13 12:08:55 CEST 2023 - aschnell@suse.com + +- update qgroup in config info in snapperd when running setup-quota + ------------------------------------------------------------------- Fri Apr 21 09:47:57 CEST 2023 - aschnell@suse.com diff --git a/server/Client.cc b/server/Client.cc index 391c1cec..74a3cbc2 100644 --- a/server/Client.cc +++ b/server/Client.cc @@ -1593,6 +1593,7 @@ Client::setup_quota(DBus::Connection& conn, DBus::Message& msg) Snapper* snapper = it->getSnapper(); snapper->setupQuota(); + it->updateConfigInfo("QGROUP"); DBus::MessageMethodReturn reply(msg); diff --git a/server/MetaSnapper.cc b/server/MetaSnapper.cc index 5013dd66..506c6286 100644 --- a/server/MetaSnapper.cc +++ b/server/MetaSnapper.cc @@ -1,6 +1,6 @@ /* * Copyright (c) [2012-2015] Novell, Inc. - * Copyright (c) [2018-2022] SUSE LLC + * Copyright (c) [2018-2023] SUSE LLC * * All Rights Reserved. * @@ -62,6 +62,16 @@ MetaSnapper::setConfigInfo(const map& raw) } +void +MetaSnapper::updateConfigInfo(const char* key) +{ + string value; + + if (getSnapper()->getConfigInfo().get_value(key, value)) + config_info.set_value(key, value); +} + + void MetaSnapper::set_permissions() { diff --git a/server/MetaSnapper.h b/server/MetaSnapper.h index 36053b40..7377e123 100644 --- a/server/MetaSnapper.h +++ b/server/MetaSnapper.h @@ -1,6 +1,6 @@ /* * Copyright (c) [2012-2015] Novell, Inc. - * Copyright (c) [2018-2022] SUSE LLC + * Copyright (c) [2018-2023] SUSE LLC * * All Rights Reserved. * @@ -54,6 +54,8 @@ public: const ConfigInfo& getConfigInfo() const { return config_info; } void setConfigInfo(const map& raw); + void updateConfigInfo(const char* key); + const vector& get_allowed_uids() const { return allowed_uids; } const vector& get_allowed_gids() const { return allowed_gids; }