}
}
-void ValidatePackageRWFS(const std::string& pkgid, uid_t uid, gid_t gid) {
+void ValidatePackageRWFS(const std::string& pkgid, uid_t uid) {
bf::path root_path = ci::GetRootAppPath(false, uid);
bf::path package_path = root_path / pkgid;
bf::path data_path = package_path / "data";
struct stat stats;
stat(data_path.c_str(), &stats);
- // gid of data, and shared/data should be system_share
+ // gid of RW dirs should be system_share
boost::optional<gid_t> system_share =
ci::GetGidByGroupName(kSystemShareGroupName);
ASSERT_EQ(uid, stats.st_uid) << "Invalid gid: " << data_path;
stat(cache_path.c_str(), &stats);
ASSERT_EQ(uid, stats.st_uid) << "Invalid gid: " << cache_path;
- ASSERT_EQ(gid, stats.st_gid) << "Invalid gid: " << cache_path;
+ ASSERT_EQ(*system_share, stats.st_gid) << "Invalid gid: " << cache_path;
}
void ValidatePackageFS(const std::string& pkgid,
if (kTestUserId == kGlobalUserUid) {
ci::UserList list = ci::GetUserList();
for (auto& l : list)
- ValidatePackageRWFS(pkgid, std::get<0>(l), std::get<1>(l));
+ ValidatePackageRWFS(pkgid, std::get<0>(l));
} else {
- ValidatePackageRWFS(pkgid, kTestUserId, kTestGroupId);
+ ValidatePackageRWFS(pkgid, kTestUserId);
}
}