]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- update qgroup in config info in snapperd when running setup-quota 818/head
authorArvin Schnell <aschnell@suse.de>
Tue, 13 Jun 2023 10:10:21 +0000 (12:10 +0200)
committerArvin Schnell <aschnell@suse.de>
Tue, 13 Jun 2023 10:10:21 +0000 (12:10 +0200)
package/snapper.changes
server/Client.cc
server/MetaSnapper.cc
server/MetaSnapper.h

index 2dbe7652f71c18e7f3ed26bc3b642d4cc613a2fa..5257eb52492b271b7420b66c4f400ace43da7fcc 100644 (file)
@@ -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
 
index 391c1cecb861ae18451466fbf38db4f455f7f456..74a3cbc24617febca0ae133b0194030709af6399 100644 (file)
@@ -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);
 
index 5013dd66e0353bc1315e1530a1aec2abc4cd6c26..506c6286732f44af6d0d18f5aa0d30d293a25c10 100644 (file)
@@ -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<string, string>& 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()
 {
index 36053b4035bb5bd3232ff5b74b020fe6a93b53ce..7377e123fb20c98a3cb467635d1a2b2a58b7bc85 100644 (file)
@@ -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<string, string>& raw);
 
+    void updateConfigInfo(const char* key);
+
     const vector<uid_t>& get_allowed_uids() const { return allowed_uids; }
     const vector<gid_t>& get_allowed_gids() const { return allowed_gids; }