blob: bb24f77f3b922adb77df036c3cd4134312267fa9 [file] [log] [blame]
Ed Tanous40e9b922024-09-10 13:50:16 -07001// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright OpenBMC Authors
Ed Tanousba9f9a62017-10-11 16:40:35 -07003#pragma once
4
Ed Tanous3ccb3ad2023-01-13 17:40:03 -08005#include "event_service_store.hpp"
Ed Tanousd7857202025-01-28 15:32:26 -08006#include "logging.hpp"
Ed Tanous2c6ffdb2023-06-28 11:28:38 -07007#include "ossl_random.hpp"
Ed Tanous3ccb3ad2023-01-13 17:40:03 -08008#include "sessions.hpp"
Ed Tanousd7857202025-01-28 15:32:26 -08009// NOLINTNEXTLINE(misc-include-cleaner)
10#include "utility.hpp"
Ed Tanous3ccb3ad2023-01-13 17:40:03 -080011
Ed Tanousd7857202025-01-28 15:32:26 -080012#include <boost/beast/core/file_base.hpp>
Ed Tanousc282e8b2024-07-01 08:56:34 -070013#include <boost/beast/core/file_posix.hpp>
Ed Tanous601c71a2021-09-08 16:40:12 -070014#include <boost/beast/http/fields.hpp>
Ed Tanous1abe55e2018-09-05 08:30:59 -070015#include <nlohmann/json.hpp>
Ed Tanousba9f9a62017-10-11 16:40:35 -070016
Ed Tanousd7857202025-01-28 15:32:26 -080017#include <chrono>
18#include <cstdint>
Gunnar Mills1214b7e2020-06-04 10:11:30 -050019#include <filesystem>
James Feist3909dc82020-04-03 10:58:55 -070020#include <fstream>
Ed Tanousd7857202025-01-28 15:32:26 -080021#include <memory>
22#include <optional>
23#include <string>
Ed Tanousc282e8b2024-07-01 08:56:34 -070024#include <system_error>
Ed Tanousd7857202025-01-28 15:32:26 -080025#include <utility>
Gunnar Mills1214b7e2020-06-04 10:11:30 -050026
Ed Tanous1abe55e2018-09-05 08:30:59 -070027namespace persistent_data
28{
Borawski.Lukasz9d8fd302018-01-05 14:56:09 +010029
Ed Tanous52cc1122020-07-18 13:51:21 -070030class ConfigFile
Ed Tanous1abe55e2018-09-05 08:30:59 -070031{
Ed Tanous271584a2019-07-09 16:24:22 -070032 uint64_t jsonRevision = 1;
Ed Tanousc963aa42017-10-27 16:00:19 -070033
Ed Tanous1abe55e2018-09-05 08:30:59 -070034 public:
Ed Tanous13880452025-09-17 09:23:26 -070035 static std::string getStateFile()
36 {
37 // NOLINTNEXTLINE(concurrency-mt-unsafe)
38 const char* stateDir = std::getenv("STATE_DIRECTORY");
39 if (stateDir == nullptr)
40 {
41 stateDir = ".";
42 }
43 return std::string(stateDir) + "/bmcweb_persistent_data.json";
44 }
45
46 static const std::string& filename()
47 {
48 const static std::string fname = getStateFile();
49 return fname;
50 }
Ratan Gupta845cb7d2019-07-12 00:32:25 +053051
Ed Tanous52cc1122020-07-18 13:51:21 -070052 ConfigFile()
Ed Tanous1abe55e2018-09-05 08:30:59 -070053 {
54 readData();
Ed Tanousc963aa42017-10-27 16:00:19 -070055 }
Ed Tanousc963aa42017-10-27 16:00:19 -070056
Ed Tanous52cc1122020-07-18 13:51:21 -070057 ~ConfigFile()
Ed Tanous1abe55e2018-09-05 08:30:59 -070058 {
Gunnar Mills83cf8182020-11-11 15:37:34 -060059 // Make sure we aren't writing stale sessions
60 persistent_data::SessionStore::getInstance().applySessionTimeouts();
Ed Tanous1abe55e2018-09-05 08:30:59 -070061 if (persistent_data::SessionStore::getInstance().needsWrite())
62 {
63 writeData();
Kowalski, Kamil5cef0f72018-02-15 15:26:51 +010064 }
Ed Tanousc963aa42017-10-27 16:00:19 -070065 }
Ed Tanousc963aa42017-10-27 16:00:19 -070066
Ed Tanousecd6a3a2022-01-07 09:18:40 -080067 ConfigFile(const ConfigFile&) = delete;
68 ConfigFile(ConfigFile&&) = delete;
69 ConfigFile& operator=(const ConfigFile&) = delete;
70 ConfigFile& operator=(ConfigFile&&) = delete;
71
Ed Tanous1abe55e2018-09-05 08:30:59 -070072 // TODO(ed) this should really use protobuf, or some other serialization
73 // library, but adding another dependency is somewhat outside the scope of
74 // this application for the moment
75 void readData()
76 {
Ed Tanous13880452025-09-17 09:23:26 -070077 std::ifstream persistentFile(filename());
Ed Tanous271584a2019-07-09 16:24:22 -070078 uint64_t fileRevision = 0;
Ed Tanous1abe55e2018-09-05 08:30:59 -070079 if (persistentFile.is_open())
80 {
81 // call with exceptions disabled
82 auto data = nlohmann::json::parse(persistentFile, nullptr, false);
83 if (data.is_discarded())
84 {
Ed Tanous62598e32023-07-17 17:06:25 -070085 BMCWEB_LOG_ERROR("Error parsing persistent data in json file.");
Ed Tanous1abe55e2018-09-05 08:30:59 -070086 }
87 else
88 {
Ed Tanous0bdda662023-08-03 17:27:34 -070089 const nlohmann::json::object_t* obj =
90 data.get_ptr<nlohmann::json::object_t*>();
91 if (obj == nullptr)
Ed Tanous1abe55e2018-09-05 08:30:59 -070092 {
Ed Tanous0bdda662023-08-03 17:27:34 -070093 return;
94 }
95 for (const auto& item : *obj)
96 {
97 if (item.first == "revision")
Ed Tanous1abe55e2018-09-05 08:30:59 -070098 {
99 fileRevision = 0;
100
101 const uint64_t* uintPtr =
Ed Tanous0bdda662023-08-03 17:27:34 -0700102 item.second.get_ptr<const uint64_t*>();
Ed Tanous1abe55e2018-09-05 08:30:59 -0700103 if (uintPtr == nullptr)
104 {
Ed Tanous62598e32023-07-17 17:06:25 -0700105 BMCWEB_LOG_ERROR("Failed to read revision flag");
Ed Tanous1abe55e2018-09-05 08:30:59 -0700106 }
107 else
108 {
109 fileRevision = *uintPtr;
110 }
111 }
Ed Tanous0bdda662023-08-03 17:27:34 -0700112 else if (item.first == "system_uuid")
Ed Tanous1abe55e2018-09-05 08:30:59 -0700113 {
114 const std::string* jSystemUuid =
Ed Tanous0bdda662023-08-03 17:27:34 -0700115 item.second.get_ptr<const std::string*>();
Ed Tanous1abe55e2018-09-05 08:30:59 -0700116 if (jSystemUuid != nullptr)
117 {
118 systemUuid = *jSystemUuid;
119 }
120 }
Corey Ethingtone30d3342025-06-24 11:25:11 -0400121 else if (item.first == "service_identification")
122 {
123 const std::string* jServiceIdentification =
124 item.second.get_ptr<const std::string*>();
125 if (jServiceIdentification != nullptr)
126 {
127 serviceIdentification = *jServiceIdentification;
128 }
129 }
Ed Tanous0bdda662023-08-03 17:27:34 -0700130 else if (item.first == "auth_config")
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100131 {
Ed Tanous82b286f2025-05-06 13:29:48 -0700132 const nlohmann::json::object_t* jObj =
133 item.second
134 .get_ptr<const nlohmann::json::object_t*>();
135 if (jObj == nullptr)
136 {
137 continue;
138 }
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100139 SessionStore::getInstance()
140 .getAuthMethodsConfig()
Ed Tanous82b286f2025-05-06 13:29:48 -0700141 .fromJson(*jObj);
Zbigniew Kurzynski78158632019-11-05 12:57:37 +0100142 }
Ed Tanous0bdda662023-08-03 17:27:34 -0700143 else if (item.first == "sessions")
Ed Tanous1abe55e2018-09-05 08:30:59 -0700144 {
Ed Tanous0bdda662023-08-03 17:27:34 -0700145 for (const auto& elem : item.second)
Ed Tanous1abe55e2018-09-05 08:30:59 -0700146 {
Ed Tanous82b286f2025-05-06 13:29:48 -0700147 const nlohmann::json::object_t* jObj =
148 elem.get_ptr<const nlohmann::json::object_t*>();
149 if (jObj == nullptr)
150 {
151 continue;
152 }
Ed Tanous1abe55e2018-09-05 08:30:59 -0700153 std::shared_ptr<UserSession> newSession =
Ed Tanous82b286f2025-05-06 13:29:48 -0700154 UserSession::fromJson(*jObj);
Ed Tanous1abe55e2018-09-05 08:30:59 -0700155
156 if (newSession == nullptr)
157 {
Ed Tanous62598e32023-07-17 17:06:25 -0700158 BMCWEB_LOG_ERROR("Problem reading session "
159 "from persistent store");
Ed Tanous1abe55e2018-09-05 08:30:59 -0700160 continue;
161 }
162
Ed Tanous62598e32023-07-17 17:06:25 -0700163 BMCWEB_LOG_DEBUG("Restored session: {} {} {}",
164 newSession->csrfToken,
165 newSession->uniqueId,
166 newSession->sessionToken);
Ed Tanous1abe55e2018-09-05 08:30:59 -0700167 SessionStore::getInstance().authTokens.emplace(
168 newSession->sessionToken, newSession);
169 }
170 }
Ed Tanous0bdda662023-08-03 17:27:34 -0700171 else if (item.first == "timeout")
Manojkiran Edaf2a4a602020-08-27 16:04:26 +0530172 {
173 const int64_t* jTimeout =
Ed Tanous0bdda662023-08-03 17:27:34 -0700174 item.second.get_ptr<const int64_t*>();
Manojkiran Edaf2a4a602020-08-27 16:04:26 +0530175 if (jTimeout == nullptr)
176 {
Ed Tanous62598e32023-07-17 17:06:25 -0700177 BMCWEB_LOG_DEBUG(
178 "Problem reading session timeout value");
Manojkiran Edaf2a4a602020-08-27 16:04:26 +0530179 continue;
180 }
181 std::chrono::seconds sessionTimeoutInseconds(*jTimeout);
Ed Tanous62598e32023-07-17 17:06:25 -0700182 BMCWEB_LOG_DEBUG("Restored Session Timeout: {}",
183 sessionTimeoutInseconds.count());
Manojkiran Edaf2a4a602020-08-27 16:04:26 +0530184 SessionStore::getInstance().updateSessionTimeout(
185 sessionTimeoutInseconds);
186 }
Ed Tanous0bdda662023-08-03 17:27:34 -0700187 else if (item.first == "eventservice_config")
JunLin Chen28afb492021-02-24 17:13:29 +0800188 {
Ed Tanous0bdda662023-08-03 17:27:34 -0700189 const nlohmann::json::object_t* esobj =
190 item.second
191 .get_ptr<const nlohmann::json::object_t*>();
192 if (esobj == nullptr)
193 {
194 BMCWEB_LOG_DEBUG(
195 "Problem reading EventService value");
196 continue;
197 }
198
JunLin Chen28afb492021-02-24 17:13:29 +0800199 EventServiceStore::getInstance()
200 .getEventServiceConfig()
Ed Tanous0bdda662023-08-03 17:27:34 -0700201 .fromJson(*esobj);
JunLin Chen28afb492021-02-24 17:13:29 +0800202 }
Ed Tanous0bdda662023-08-03 17:27:34 -0700203 else if (item.first == "subscriptions")
JunLin Chen28afb492021-02-24 17:13:29 +0800204 {
Ed Tanous0bdda662023-08-03 17:27:34 -0700205 for (const auto& elem : item.second)
JunLin Chen28afb492021-02-24 17:13:29 +0800206 {
Ed Tanous82b286f2025-05-06 13:29:48 -0700207 const nlohmann::json::object_t* subobj =
208 elem.get_ptr<const nlohmann::json::object_t*>();
209 if (subobj == nullptr)
210 {
211 continue;
212 }
213
Ed Tanous4b712a22023-08-02 12:56:52 -0700214 std::optional<UserSubscription> newSub =
Ed Tanous82b286f2025-05-06 13:29:48 -0700215 UserSubscription::fromJson(*subobj);
JunLin Chen28afb492021-02-24 17:13:29 +0800216
Ed Tanous4b712a22023-08-02 12:56:52 -0700217 if (!newSub)
JunLin Chen28afb492021-02-24 17:13:29 +0800218 {
Myung Bae6136e852025-05-14 07:53:45 -0400219 BMCWEB_LOG_ERROR(
220 "Problem reading subscription from persistent store");
JunLin Chen28afb492021-02-24 17:13:29 +0800221 continue;
222 }
223
Myung Bae6136e852025-05-14 07:53:45 -0400224 std::string id = newSub->id;
225 BMCWEB_LOG_DEBUG("Restored subscription: {} {}", id,
226 newSub->customText);
Ed Tanous4b712a22023-08-02 12:56:52 -0700227
Myung Bae5fe4ef32024-10-19 09:56:02 -0400228 EventServiceStore::getInstance()
229 .subscriptionsConfigMap.emplace(
Myung Bae6136e852025-05-14 07:53:45 -0400230 id, std::make_shared<UserSubscription>(
231 std::move(*newSub)));
JunLin Chen28afb492021-02-24 17:13:29 +0800232 }
233 }
Ed Tanous1abe55e2018-09-05 08:30:59 -0700234 else
235 {
236 // Do nothing in the case of extra fields. We may have
237 // cases where fields are added in the future, and we
238 // want to at least attempt to gracefully support
239 // downgrades in that case, even if we don't officially
240 // support it
241 }
242 }
243 }
244 }
245 bool needWrite = false;
246
247 if (systemUuid.empty())
248 {
Ed Tanous2c6ffdb2023-06-28 11:28:38 -0700249 systemUuid = bmcweb::getRandomUUID();
Ed Tanous1abe55e2018-09-05 08:30:59 -0700250 needWrite = true;
251 }
252 if (fileRevision < jsonRevision)
253 {
254 needWrite = true;
255 }
256 // write revision changes or system uuid changes immediately
257 if (needWrite)
258 {
259 writeData();
260 }
261 }
262
263 void writeData()
264 {
Ed Tanous13880452025-09-17 09:23:26 -0700265 const std::string& fname = filename();
266 std::filesystem::path path(fname);
Ed Tanousc282e8b2024-07-01 08:56:34 -0700267 path = path.parent_path();
Myung Baed8f8a7d2024-10-23 12:55:08 -0400268 if (!path.empty())
Ed Tanousc282e8b2024-07-01 08:56:34 -0700269 {
Myung Baed8f8a7d2024-10-23 12:55:08 -0400270 std::error_code ecDir;
271 std::filesystem::create_directories(path, ecDir);
272 if (ecDir)
273 {
274 BMCWEB_LOG_CRITICAL("Can't create persistent folders {}",
275 ecDir.message());
276 return;
277 }
Ed Tanousc282e8b2024-07-01 08:56:34 -0700278 }
279 boost::beast::file_posix persistentFile;
280 boost::system::error_code ec;
Ed Tanous13880452025-09-17 09:23:26 -0700281 persistentFile.open(fname.c_str(), boost::beast::file_mode::write, ec);
Ed Tanousc282e8b2024-07-01 08:56:34 -0700282 if (ec)
283 {
284 BMCWEB_LOG_CRITICAL("Unable to store persistent data to file {}",
285 ec.message());
286 return;
287 }
Ratan Gupta845cb7d2019-07-12 00:32:25 +0530288
289 // set the permission of the file to 640
Ed Tanous52cc1122020-07-18 13:51:21 -0700290 std::filesystem::perms permission =
291 std::filesystem::perms::owner_read |
292 std::filesystem::perms::owner_write |
293 std::filesystem::perms::group_read;
Ed Tanous13880452025-09-17 09:23:26 -0700294 std::filesystem::permissions(fname, permission, ec);
Ed Tanousc282e8b2024-07-01 08:56:34 -0700295 if (ec)
296 {
297 BMCWEB_LOG_CRITICAL("Failed to set filesystem permissions {}",
298 ec.message());
299 return;
300 }
Ed Tanous3ce36882024-06-09 10:58:16 -0700301 const AuthConfigMethods& c =
302 SessionStore::getInstance().getAuthMethodsConfig();
JunLin Chen28afb492021-02-24 17:13:29 +0800303 const auto& eventServiceConfig =
304 EventServiceStore::getInstance().getEventServiceConfig();
Ed Tanous14766872022-03-15 10:44:42 -0700305 nlohmann::json::object_t data;
306 nlohmann::json& authConfig = data["auth_config"];
Ratan Gupta845cb7d2019-07-12 00:32:25 +0530307
Ed Tanous14766872022-03-15 10:44:42 -0700308 authConfig["XToken"] = c.xtoken;
309 authConfig["Cookie"] = c.cookie;
310 authConfig["SessionToken"] = c.sessionToken;
311 authConfig["BasicAuth"] = c.basic;
312 authConfig["TLS"] = c.tls;
Ed Tanous3281bcf2024-06-25 16:02:05 -0700313 authConfig["TLSStrict"] = c.tlsStrict;
Malik Akbar Hashemi Rafsanjani86e41a82025-05-06 11:23:32 -0700314 authConfig["MTLSCommonNameParseMode"] =
Ed Tanous3ce36882024-06-09 10:58:16 -0700315 static_cast<int>(c.mTLSCommonNameParsingMode);
JunLin Chen28afb492021-02-24 17:13:29 +0800316
Ed Tanous14766872022-03-15 10:44:42 -0700317 nlohmann::json& eventserviceConfig = data["eventservice_config"];
318 eventserviceConfig["ServiceEnabled"] = eventServiceConfig.enabled;
319 eventserviceConfig["DeliveryRetryAttempts"] =
320 eventServiceConfig.retryAttempts;
321 eventserviceConfig["DeliveryRetryIntervalSeconds"] =
322 eventServiceConfig.retryTimeoutInterval;
323
324 data["system_uuid"] = systemUuid;
Corey Ethingtone30d3342025-06-24 11:25:11 -0400325 data["service_identification"] = serviceIdentification;
Ed Tanous14766872022-03-15 10:44:42 -0700326 data["revision"] = jsonRevision;
327 data["timeout"] = SessionStore::getInstance().getTimeoutInSeconds();
Ed Tanous5fb91ba2020-09-28 15:41:28 -0700328
329 nlohmann::json& sessions = data["sessions"];
330 sessions = nlohmann::json::array();
331 for (const auto& p : SessionStore::getInstance().authTokens)
332 {
Ed Tanous89cda632024-04-16 08:45:54 -0700333 if (p.second->sessionType != persistent_data::SessionType::Basic &&
334 p.second->sessionType !=
335 persistent_data::SessionType::MutualTLS)
Ed Tanous5fb91ba2020-09-28 15:41:28 -0700336 {
Ed Tanous14766872022-03-15 10:44:42 -0700337 nlohmann::json::object_t session;
338 session["unique_id"] = p.second->uniqueId;
339 session["session_token"] = p.second->sessionToken;
340 session["username"] = p.second->username;
341 session["csrf_token"] = p.second->csrfToken;
342 session["client_ip"] = p.second->clientIp;
Ed Tanouse01d0c32023-06-30 13:21:32 -0700343 const std::optional<std::string>& clientId = p.second->clientId;
344 if (clientId)
Ed Tanousbb759e32022-08-02 17:07:54 -0700345 {
Ed Tanouse01d0c32023-06-30 13:21:32 -0700346 session["client_id"] = *clientId;
Ed Tanousbb759e32022-08-02 17:07:54 -0700347 }
Patrick Williamsb2ba3072023-05-12 10:27:39 -0500348 sessions.emplace_back(std::move(session));
Ed Tanous5fb91ba2020-09-28 15:41:28 -0700349 }
350 }
JunLin Chen28afb492021-02-24 17:13:29 +0800351 nlohmann::json& subscriptions = data["subscriptions"];
352 subscriptions = nlohmann::json::array();
353 for (const auto& it :
354 EventServiceStore::getInstance().subscriptionsConfigMap)
355 {
Myung Bae5fe4ef32024-10-19 09:56:02 -0400356 if (it.second == nullptr)
357 {
358 continue;
359 }
360 const UserSubscription& subValue = *it.second;
wenlitaofbfb7882024-07-12 11:25:00 +0800361 if (subValue.subscriptionType == "SSE")
JunLin Chen28afb492021-02-24 17:13:29 +0800362 {
Ed Tanous62598e32023-07-17 17:06:25 -0700363 BMCWEB_LOG_DEBUG("The subscription type is SSE, so skipping.");
JunLin Chen28afb492021-02-24 17:13:29 +0800364 continue;
365 }
Ed Tanous601c71a2021-09-08 16:40:12 -0700366 nlohmann::json::object_t headers;
367 for (const boost::beast::http::fields::value_type& header :
wenlitaofbfb7882024-07-12 11:25:00 +0800368 subValue.httpHeaders)
Ed Tanous601c71a2021-09-08 16:40:12 -0700369 {
370 // Note, these are technically copies because nlohmann doesn't
371 // support key lookup by std::string_view. At least the
372 // following code can use move
373 // https://github.com/nlohmann/json/issues/1529
374 std::string name(header.name_string());
375 headers[std::move(name)] = header.value();
376 }
377
Ed Tanous14766872022-03-15 10:44:42 -0700378 nlohmann::json::object_t subscription;
379
wenlitaofbfb7882024-07-12 11:25:00 +0800380 subscription["Id"] = subValue.id;
381 subscription["Context"] = subValue.customText;
382 subscription["DeliveryRetryPolicy"] = subValue.retryPolicy;
Myung Bae5064a252024-10-04 09:34:25 -0700383 subscription["SendHeartbeat"] = subValue.sendHeartbeat;
384 subscription["HeartbeatIntervalMinutes"] =
385 subValue.hbIntervalMinutes;
wenlitaofbfb7882024-07-12 11:25:00 +0800386 subscription["Destination"] = subValue.destinationUrl;
387 subscription["EventFormatType"] = subValue.eventFormatType;
Ed Tanous14766872022-03-15 10:44:42 -0700388 subscription["HttpHeaders"] = std::move(headers);
wenlitaofbfb7882024-07-12 11:25:00 +0800389 subscription["MessageIds"] = subValue.registryMsgIds;
390 subscription["Protocol"] = subValue.protocol;
391 subscription["RegistryPrefixes"] = subValue.registryPrefixes;
Ed Tanousa14c9112024-09-04 10:46:47 -0700392 subscription["OriginResources"] = subValue.originResources;
wenlitaofbfb7882024-07-12 11:25:00 +0800393 subscription["ResourceTypes"] = subValue.resourceTypes;
394 subscription["SubscriptionType"] = subValue.subscriptionType;
Ed Tanous14766872022-03-15 10:44:42 -0700395 subscription["MetricReportDefinitions"] =
wenlitaofbfb7882024-07-12 11:25:00 +0800396 subValue.metricReportDefinitions;
Ed Tanous19bb3622024-07-05 10:07:40 -0500397 subscription["VerifyCertificate"] = subValue.verifyCertificate;
Ed Tanous14766872022-03-15 10:44:42 -0700398
Patrick Williamsb2ba3072023-05-12 10:27:39 -0500399 subscriptions.emplace_back(std::move(subscription));
JunLin Chen28afb492021-02-24 17:13:29 +0800400 }
Ed Tanousc282e8b2024-07-01 08:56:34 -0700401 std::string out = nlohmann::json(data).dump(
402 -1, ' ', true, nlohmann::json::error_handler_t::replace);
403 persistentFile.write(out.data(), out.size(), ec);
404 if (ec)
405 {
406 BMCWEB_LOG_ERROR("Failed to write file {}", ec.message());
407 }
Ed Tanous1abe55e2018-09-05 08:30:59 -0700408 }
409
Ed Tanouse05aec52022-01-25 10:28:56 -0800410 std::string systemUuid;
Corey Ethingtone30d3342025-06-24 11:25:11 -0400411 std::string serviceIdentification;
Ed Tanousba9f9a62017-10-11 16:40:35 -0700412};
413
Ed Tanous52cc1122020-07-18 13:51:21 -0700414inline ConfigFile& getConfig()
415{
416 static ConfigFile f;
417 return f;
418}
419
Ed Tanous1abe55e2018-09-05 08:30:59 -0700420} // namespace persistent_data