snapuserd: Don't specify a path to TemporaryFile.

Placing temporary files in the executable dir creates unexpected files
in the build dir when running on the host, which linger if snapuserd
crashes.

Bug: 288273605
Test: snapuserd_test
Change-Id: Ia1ea4ba70b645a9d2f49419b91003bc62fb03cb2
This commit is contained in:
David Anderson 2023-08-07 14:59:07 -07:00
parent dbda1300ae
commit 4e0d58c9e5

View file

@ -108,8 +108,7 @@ void SnapuserdTestBase::CreateBaseDevice() {
}
std::unique_ptr<ICowWriter> SnapuserdTestBase::CreateCowDeviceInternal() {
std::string path = android::base::GetExecutableDirectory();
cow_system_ = std::make_unique<TemporaryFile>(path);
cow_system_ = std::make_unique<TemporaryFile>();
CowOptions options;
options.compression = "gz";