- preload-rw : located in /opt/usr/globalapps/ and preloaded.
- readonly : located in /usr/apps/ and preloaded. (== old preload_request)
some preload-rw package can be not-removable also like as readonly package.
Requires :
https://review.tizen.org/gerrit/#/c/99207/
Change-Id: I8ae7cfdb06467f4e27f1b23f2573d21ad54ee75d
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
Name: app-installers
Summary: Application installers
-Version: 1.8
+Version: 1.9
Release: 1
Group: Application Framework/Package Management
License: Apache-2.0
context_->pkgid.get());
}
- if (context_->installation_mode.get() == InstallationMode::OFFLINE &&
- context_->is_preload_request.get() &&
- process_status != Step::Status::OK) {
+ if ((context_->installation_mode.get() == InstallationMode::OFFLINE) &&
+ (process_status != Step::Status::OK)) {
std::fstream info_file("/tmp/.preload_install_error",
std::ios::out | std::ios::app);
info_file << context_->pkgid.get() << std::endl;
uid(getuid()),
backend_data(nullptr),
privilege_level(PrivilegeLevel::UNTRUSTED),
- is_preload_request(false),
+ is_readonly_package(false),
+ is_preload_rw_package(false),
+ force_remove(false),
+ no_remove(false),
cross_app_rules(false) {}
InstallerContext::~InstallerContext() {
Property<InstallationMode> installation_mode;
/**
- * \brief preload request received from pkgmgr_installer
+ * \brief readonly request received from pkgmgr_installer
*/
- Property<bool> is_preload_request;
+ Property<bool> is_readonly_package;
+
+ /**
+ * \brief preload-rw request received from pkgmgr_installer
+ */
+ Property<bool> is_preload_rw_package;
/**
* \brief force-remove request received from pkgmgr_installer
*/
Property<bool> force_remove;
+ /**
+ * \brief no-remove request received from pkgmgr_installer
+ */
+ Property<bool> no_remove;
+
/**
* \brief Describes behaviour for security manager. It set to true, this will
* force to generates n-to-n rules for package's apps.
}
bool PkgMgrInterface::GetIsTepMove() {
- return (pkgmgr_installer_get_tep_move_type(pi_) == 1)?true:false;
+ return (pkgmgr_installer_get_tep_move_type(pi_) == 1);
}
bool PkgMgrInterface::GetIsMoveToExternal() {
}
bool PkgMgrInterface::GetIsPreloadRequest() {
- return (pkgmgr_installer_get_is_preload(pi_) == 1)?
- true:(install_mode_ == InstallationMode::OFFLINE)?
- true:false;
+ return (pkgmgr_installer_get_is_preload(pi_) == 1);
+}
+
+bool PkgMgrInterface::GetIsPreloadRWRequest() {
+ return (pkgmgr_installer_get_is_preload_rw(pi_) == 1);
}
std::unique_ptr<PkgmgrSignal> PkgMgrInterface::CreatePkgmgrSignal() const {
}
bool PkgMgrInterface::GetIsForceRemoval() {
- // root only
- return (getuid() == 0 && pkgmgr_installer_get_force_removal(pi_) == 1);
+ return (pkgmgr_installer_get_force_removal(pi_) == 1);
+}
+
+bool PkgMgrInterface::GetIsNoRemoval() {
+ return (pkgmgr_installer_get_no_removal(pi_) == 1);
}
} // namespace common_installer
*/
bool GetIsPreloadRequest();
+ /**
+ * Returns True if the request is for preload-rw. Otherwise, return false
+ *
+ * \return True if the request is for preload-rw. Otherwise, return false
+ */
+ bool GetIsPreloadRWRequest();
+
/**
* Returns True if the request is for force-remove. Otherwise, return false
*
*/
bool GetIsForceRemoval();
+ /**
+ * Returns True if the request is for no-remove. Otherwise, return false
+ *
+ * \return True if the request is for no-remove. Otherwise, return false
+ */
+ bool GetIsNoRemoval();
+
/**
* Get Raw pointer to pkgmgr_installer object
* NOTE: It should not be used (PkgMgrInterface can destroy it
return is_global;
}
-bool QueryIsPreloadPackage(const std::string& pkg_id, uid_t uid) {
+bool QueryIsReadonlyPackage(const std::string& pkg_id, uid_t uid) {
pkgmgrinfo_pkginfo_h handle;
int ret = pkgmgrinfo_pkginfo_get_usr_pkginfo(pkg_id.c_str(), uid, &handle);
if (ret != PMINFO_R_OK) {
return false;
}
- bool is_preload = false;
- if (pkgmgrinfo_pkginfo_is_preload(handle, &is_preload) != PMINFO_R_OK) {
- LOG(ERROR) << "pkgmgrinfo_pkginfo_is_preload failed";
+ bool is_readonly = false;
+ if (pkgmgrinfo_pkginfo_is_readonly(handle, &is_readonly) != PMINFO_R_OK) {
+ LOG(ERROR) << "pkgmgrinfo_pkginfo_is_readonly failed";
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
return false;
}
pkgmgrinfo_pkginfo_destroy_pkginfo(handle);
- return is_preload;
+ return is_readonly;
}
} // namespace common_installer
/**
* \brief Adapter interface for external PkgMgr module used for checking
- * if given package is preloaded package
+ * if given package is readonly package
*
* \param pkg_id package id
* \param uid user id
*
- * \return true if package is preloaded
+ * \return true if package is readonly
*/
-bool QueryIsPreloadPackage(const std::string& pkg_id, uid_t uid);
+bool QueryIsReadonlyPackage(const std::string& pkg_id, uid_t uid);
} // namespace common_installer
return true;
}
-// "preload" : this package was installed at the binary creation.
+// "preload" : pre-installed package at the first boot state.
+// this package exists in both readonly and readwrite.
// "system" : this package is "preload" and is not removable.
-// "update" : this package is "preload" but is updated after first installation.
+// "update" : this package is "preload" and is updated by downloadable update.
// "removable" : this package can be removed.
// "readonly" : this package exists in readonly location.
bool AssignPackageTags(manifest_x* manifest,
bool is_update) {
+ // preload, removalbe and readonly : in parse_preload step.
+ manifest->system = strdup("false");
+ manifest->update = strdup("false");
if (!strcmp(manifest->preload, "true")) {
- manifest->removable = strdup("false");
- manifest->readonly = strdup("true");
- manifest->system = strdup("true");
if (is_update)
manifest->update = strdup("true");
- else
- manifest->update = strdup("false");
- } else {
- manifest->removable = strdup("true");
- manifest->readonly = strdup("false");
- manifest->system = strdup("false");
- manifest->update = strdup("false");
+ if (!strcmp(manifest->removable, "false"))
+ manifest->system = strdup("true");
}
return true;
RequestMode::GLOBAL : RequestMode::USER;
}
-// Now, preload app is always installed RO location.
-const char* GetRootAppPath(bool is_preload, uid_t uid) {
+// Now, readonly app is always installed RO location.
+const char* GetRootAppPath(bool is_readonly, uid_t uid) {
if (GetRequestMode(uid) == RequestMode::GLOBAL) {
- return is_preload ?
+ return is_readonly ?
tzplatform_getenv(TZ_SYS_RO_APP) : tzplatform_getenv(TZ_SYS_RW_APP);
} else {
tzplatform_set_user(uid);
*
* \return root application path (eg. $HOME/apps_rw/)
*/
-const char* GetRootAppPath(bool is_preload, uid_t uid);
+const char* GetRootAppPath(bool is_readonly, uid_t uid);
} // namespace common_installer
error = security_manager_app_inst_req_set_hybrid(req);
if (error != SECURITY_MANAGER_SUCCESS) {
std::string errnum = boost::str(boost::format("%d") % error);
- *error_message = security_manager_strerror(static_cast<lib_retcode>(error));
+ *error_message =
+ security_manager_strerror(static_cast<lib_retcode>(error));
*error_message += ":<" + errnum + ">";
return false;
}
bool PreparePathRequest(const std::string& pkg_id,
const boost::filesystem::path& path, uid_t uid, path_req* req,
- std::string* error_message) {
+ bool readonly, std::string* error_message) {
if (pkg_id.empty() || path.empty()) {
LOG(ERROR) << "Pkgid or path is empty. Both values must be set";
return false;
return false;
}
// When registering skel dir on global installation mode
- if (type == SM_APP_INSTALL_PRELOADED && getuid() != 0)
+ if (type == SM_APP_INSTALL_PRELOADED && !readonly)
type = SM_APP_INSTALL_GLOBAL;
error = security_manager_path_req_set_install_type(req, type);
bool RegisterSecurityContextForPath(const std::string &pkg_id,
const boost::filesystem::path& path, uid_t uid,
- std::string* error_message) {
+ bool readonly, std::string* error_message) {
path_req* req;
int error = security_manager_path_req_new(&req);
if (error != SECURITY_MANAGER_SUCCESS) {
return false;
}
- if (!PreparePathRequest(pkg_id, path, uid, req, error_message)) {
+ if (!PreparePathRequest(pkg_id, path, uid, req, readonly, error_message)) {
LOG(ERROR) << "Failed while preparing security_manager_app_inst_req";
security_manager_path_req_free(req);
return false;
* \param pkg_id pkgid of given package
* \param path path for registering
* \param uid uid
+ * \param readonly RO package flag
* \param error_message extra/detailed error message
*
* \return true if success
*/
bool RegisterSecurityContextForPath(const std::string &pkg_id,
const boost::filesystem::path& path, uid_t uid,
- std::string* error_message);
+ bool readonly, std::string* error_message);
} // namespace common_installer
bool CreateSkelDirectories(const std::string& pkgid,
const std::string& api_version,
- bool trusted, bool shareddata, bool is_preload) {
+ bool trusted, bool shareddata, bool is_readonly) {
bf::path path = bf::path(kSkelAppDir) / pkgid;
LOG(DEBUG) << "Creating directories in: " << path;
std::string error_message;
if (!RegisterSecurityContextForPath(pkgid, path, kGlobalUserUid,
- &error_message)) {
+ is_readonly, &error_message)) {
LOG(ERROR) << "Failed to register security context for path: " << path
<< ", error_message: " << error_message;
return false;
}
bool result = true;
- if (!is_preload) {
+ if (!is_readonly) {
bf::path src_dir = bf::path(tzplatform_getenv(TZ_SYS_RW_APP)) / pkgid;
result = CreateSymlinkFiles(src_dir, path);
}
}
std::string error_message;
if (!RegisterSecurityContextForPath(pkgid, dst, std::get<0>(l),
- &error_message)) {
+ false, &error_message)) {
LOG(ERROR) << "Failed to register security context for path: " << dst
<< ", error_message: " << error_message;
return false;
* \param api_version package api version
* \param trusted signed package flag
* \param shareddata shared data privilege flag
- * \param is_preload preload flag
+ * \param is_readonly readonly flag
*
* \return bool true if succeed, false otherwise
*
*/
bool CreateSkelDirectories(const std::string& pkgid,
const std::string& api_version,
- bool trusted, bool shareddata, bool is_preload);
+ bool trusted, bool shareddata, bool is_readonly);
/**
* \brief Performs deletion of directories
Step::Status StepBackupIcons::process() {
// gather icon info
const char* extra_icon_path = getIconPath(context_->uid.get(),
- context_->is_preload_request.get());
+ context_->is_readonly_package.get());
if (!extra_icon_path)
return Status::OK;
context_->root_application_path.get() / context_->pkgid.get();
bf::path xml_path =
bf::path(getUserManifestPath(context_->uid.get(),
- context_->is_preload_request.get()))
+ context_->is_readonly_package.get()))
/ bf::path(context_->pkgid.get());
xml_path += ".xml";
context_->unpacked_dir_path.set(package_directory);
Step::Status StepConfigure::precheck() {
SetupIsPreloadRequest();
+ SetupIsPreloadRWRequest();
+ SetupIsNoRemoval();
+
+ bool is_readonly = context_->is_readonly_package.get();
+ bool is_preload_rw = context_->is_preload_rw_package.get();
+ if (is_readonly && is_preload_rw) {
+ LOG(ERROR) << "Conflict of preload request!";
+ return Status::ERROR;
+ }
context_->uid.set(pkgmgr_->GetUid());
- if (getuid() == 0) {
- if (pkgmgr_->GetRequestType() == RequestType::ManifestDirectInstall ||
- pkgmgr_->GetRequestType() == RequestType::ManifestDirectUpdate ||
- pkgmgr_->GetRequestType() == RequestType::DisablePkg ||
- pkgmgr_->GetRequestType() == RequestType::EnablePkg) {
- LOG(INFO) << "Allowing operation for root user";
- } else if (context_->is_preload_request.get()) {
- LOG(INFO) << "Allowing preload request mode for root user";
- } else {
- LOG(ERROR) << "App-installer should not run with superuser!";
- return Status::OPERATION_NOT_ALLOWED;
- }
+ if (getuid() == 0)
return Status::OK;
- }
boost::optional<uid_t> appfw_uid = GetUidByUserName(kAppFWUser);
if (!appfw_uid)
bool StepConfigure::SetupRootAppDirectory() {
if (context_->root_application_path.get().empty()) {
std::string root_app_path =
- GetRootAppPath(context_->is_preload_request.get(), context_->uid.get());
+ GetRootAppPath(context_->is_readonly_package.get(),
+ context_->uid.get());
if (root_app_path.empty())
return false;
}
void StepConfigure::SetupIsPreloadRequest() {
- context_->is_preload_request.set(pkgmgr_->GetIsPreloadRequest());
+ context_->is_readonly_package.set(pkgmgr_->GetIsPreloadRequest());
+}
+
+void StepConfigure::SetupIsPreloadRWRequest() {
+ context_->is_preload_rw_package.set(pkgmgr_->GetIsPreloadRWRequest());
}
void StepConfigure::SetupIsForceRemoval() {
context_->force_remove.set(pkgmgr_->GetIsForceRemoval());
}
+void StepConfigure::SetupIsNoRemoval() {
+ context_->no_remove.set(pkgmgr_->GetIsNoRemoval());
+}
+
} // namespace configuration
} // namespace common_installer
void SetupRequestType();
void SetupFileCreationMask();
void SetupIsPreloadRequest();
+ void SetupIsPreloadRWRequest();
void SetupIsForceRemoval();
+ void SetupIsNoRemoval();
PkgMgrPtr pkgmgr_;
}
case ManifestLocation::INSTALLED: {
uid_t uid;
- bool is_preload;
+ bool is_readonly;
if (QueryIsGlobalPackage(context_->pkgid.get(), context_->uid.get())) {
uid = tzplatform_getuid(TZ_SYS_GLOBALAPP_USER);
- is_preload = QueryIsPreloadPackage(context_->pkgid.get(),
+ is_readonly = QueryIsReadonlyPackage(context_->pkgid.get(),
context_->uid.get());
} else {
uid = context_->uid.get();
- is_preload = context_->is_preload_request.get();
+ is_readonly = context_->is_readonly_package.get();
}
bf::path xml_path =
- bf::path(getUserManifestPath(uid, is_preload))
+ bf::path(getUserManifestPath(uid, is_readonly))
/ bf::path(context_->pkgid.get());
xml_path += ".xml";
context_->xml_path.set(xml_path);
manifest->version = strdup(pkg_info->version().c_str());
manifest->installlocation = strdup(pkg_info->install_location().c_str());
manifest->api_version = strdup(pkg_info->api_version().c_str());
+ manifest->readonly = strdup(pkg_info->readonly().c_str());
manifest->preload = strdup(pkg_info->preload().c_str());
+ manifest->removable = strdup(pkg_info->removable().c_str());
if (pkg_info->type().empty()) {
common_installer::RequestType req_type = context_->request_type.get();
if ((req_type == RequestType::ManifestDirectInstall ||
req_type == RequestType::ManifestDirectUpdate) &&
- context_->is_preload_request.get())
+ context_->is_readonly_package.get())
manifest->type = strdup("rpm");
else
manifest->type = strdup("tpk");
std::string storage = QueryStorageForPkgId(manifest->package,
context_->uid.get());
if (storage.empty()) {
- // Failed to query installation storage, assign internal for preloaded
- // applications
+ // Failed to query installation storage, assign internal
manifest->installed_storage = strdup(kInstalledInternally);
} else {
manifest->installed_storage = strdup(storage.c_str());
for (auto& splash_screen : splashscreens_info.splashscreens()) {
splashscreen_x* splashscreen =
static_cast<splashscreen_x*>(calloc(1, sizeof(splashscreen_x)));
- if (context_->is_preload_request.get())
+ if (context_->is_readonly_package.get())
splashscreen->src = strdup(splash_screen.src().c_str());
else
splashscreen->src = strdup((context_->root_application_path.get()
namespace configuration {
ci::Step::Status StepParsePreload::process() {
- const char* preload_manifest_val = context_->manifest_data.get()->preload;
-
- if (strcmp(preload_manifest_val, "true") != 0) {
- bool is_preload = context_->is_preload_request.get();
-
- LOG(INFO) << "is_preload : (" << is_preload << ")";
- if (is_preload) {
- context_->manifest_data.get()->preload = strdup("true");
+ const char* readonly_val = context_->manifest_data.get()->readonly;
+ if (!readonly_val || (readonly_val && strlen(readonly_val) == 0)) {
+ if (readonly_val)
+ free(context_->manifest_data.get()->readonly);
+ if (context_->is_readonly_package.get()) {
+ context_->manifest_data.get()->readonly = strdup("true");
if (getuid() != 0) {
- LOG(ERROR) << "You're not authorized to install preload app: "
+ LOG(ERROR) << "You're not authorized to install readonly app: "
<< context_->pkgid.get().c_str();
return Status::OPERATION_NOT_ALLOWED;
}
} else {
- context_->manifest_data.get()->preload = strdup("false");
+ context_->manifest_data.get()->readonly = strdup("false");
}
}
+ const char* preload_val = context_->manifest_data.get()->preload;
+ if (!preload_val || (preload_val && strlen(preload_val) == 0)) {
+ if (preload_val)
+ free(context_->manifest_data.get()->preload);
+ if (context_->is_readonly_package.get() ||
+ context_->is_preload_rw_package.get())
+ context_->manifest_data.get()->preload = strdup("true");
+ else
+ context_->manifest_data.get()->preload = strdup("false");
+ }
+
+ const char* removable_val = context_->manifest_data.get()->removable;
+ if (!removable_val || (removable_val && strlen(removable_val) == 0)) {
+ if (removable_val)
+ free(context_->manifest_data.get()->removable);
+ if (context_->no_remove.get() ||
+ context_->is_readonly_package.get())
+ context_->manifest_data.get()->removable = strdup("false");
+ else
+ context_->manifest_data.get()->removable = strdup("true");
+ }
+
+ if ((strcmp(context_->manifest_data.get()->readonly, "true") == 0) &&
+ (strcmp(context_->manifest_data.get()->preload, "true") != 0)) {
+ LOG(ERROR) << "invalid preload attribute, readonly but not preload!";
+ return Status::MANIFEST_ERROR;
+ }
+
+ if ((strcmp(context_->manifest_data.get()->readonly, "true") == 0) &&
+ (strcmp(context_->manifest_data.get()->removable, "false") != 0)) {
+ LOG(ERROR) << "invalid preload attribute, readonly but removable!";
+ return Status::MANIFEST_ERROR;
+ }
+
+ if ((strcmp(context_->manifest_data.get()->preload, "false") == 0) &&
+ (strcmp(context_->manifest_data.get()->removable, "false") == 0)) {
+ LOG(ERROR) << "invalid preload attribute, no preload but not removable!";
+ return Status::MANIFEST_ERROR;
+ }
+
return Status::OK;
}
return Status::ERROR;
// For icon files
- const char *iconpath = getIconPath(uid, context_->is_preload_request.get());
+ const char *iconpath = getIconPath(uid, context_->is_readonly_package.get());
if (iconpath) {
for (application_x* app :
GListRange<application_x*>(
namespace filesystem {
common_installer::Step::Status StepCreateGlobalAppSymlinks::process() {
- if (context_->is_preload_request.get())
+ if (context_->is_readonly_package.get())
return Step::Status::OK;
std::string package_id = context_->pkgid.get();
Step::Status StepCreateIcons::process() {
const char* extra_icon_path = getIconPath(context_->uid.get(),
- context_->is_preload_request.get());
+ context_->is_readonly_package.get());
if (!extra_icon_path)
return Status::OK;
}
}
if (!common_installer::CreateSkelDirectories(package_id,
- str_ver, trusted, shareddata, context_->is_preload_request.get())) {
+ str_ver, trusted, shareddata, context_->is_readonly_package.get())) {
LOG(ERROR) << "Failed to create skel dirs";
return Status::APP_DIR_ERROR;
}
}
bool ApplyModifiedFiles(const delta::DeltaInfo& info, const bf::path& app_dir,
- const bf::path& patch_dir, bool is_preload, uid_t uid) {
+ const bf::path& patch_dir, bool is_readonly,
+ uid_t uid) {
for (auto& relative : info.modified()) {
bf::path temp_file = ci::GenerateTemporaryPath(
- bf::path(ci::GetRootAppPath(is_preload, uid)) / "tmp_file");
+ bf::path(ci::GetRootAppPath(is_readonly, uid)) / "tmp_file");
bf::path patch_file = patch_dir / relative;
bf::path input = app_dir / relative;
if (!bf::is_regular_file(input)) {
}
bool ApplyPatch(const delta::DeltaInfo& info, const bf::path& app_dir,
- const bf::path& patch_dir, bool is_preload, uid_t uid) {
+ const bf::path& patch_dir, bool is_readonly, uid_t uid) {
if (!ApplyDeletedFiles(info, app_dir))
return false;
- if (!ApplyModifiedFiles(info, app_dir, patch_dir, is_preload, uid))
+ if (!ApplyModifiedFiles(info, app_dir, patch_dir, is_readonly, uid))
return false;
if (!ApplyAddedFiles(info, app_dir, patch_dir))
return false;
// apply changes mentioned in delta
if (!ApplyPatch(*delta_info, context_->unpacked_dir_path.get(), patch_dir_,
- context_->is_preload_request.get(), context_->uid.get()))
+ context_->is_readonly_package.get(), context_->uid.get()))
return Status::DELTA_ERROR;
bs::error_code error;
return Step::Status::ERROR;
// For icon files
- const char *iconpath = getIconPath(uid, context_->is_preload_request.get());
+ const char *iconpath = getIconPath(uid, context_->is_readonly_package.get());
if (iconpath) {
for (application_x* app :
GListRange<application_x*>(
// gather icon info
const char* extra_icon_path = getIconPath(context_->uid.get(),
- context_->is_preload_request.get());
+ context_->is_readonly_package.get());
if (!extra_icon_path)
return true;
for (auto iter = bf::directory_iterator(extra_icon_path);
return false;
bf::path xml_path =
bf::path(getUserManifestPath(context_->uid.get(),
- context_->is_preload_request.get()))
+ context_->is_readonly_package.get()))
/ context_->pkgid.get();
xml_path += ".xml";
context_->xml_path.set(xml_path);
namespace filesystem {
Step::Status StepRemoveGlobalAppSymlinks::process() {
- if (context_->is_preload_request.get())
+ if (context_->is_readonly_package.get())
return Step::Status::OK;
if (!QueryIsPackageInstalled(context_->pkgid.get(), kGlobalUserUid))
Step::Status StepRemoveIcons::process() {
const char* extra_icon_path = getIconPath(context_->uid.get(),
- context_->is_preload_request.get());
+ context_->is_readonly_package.get());
if (!extra_icon_path)
return Status::OK;
for (auto iter = bf::directory_iterator(extra_icon_path);
return false;
bf::path xml_path =
bf::path(getUserManifestPath(context_->uid.get(),
- context_->is_preload_request.get()))
+ context_->is_readonly_package.get()))
/ context_->pkgid.get();
xml_path += ".xml";
context_->xml_path.set(xml_path);
Step::Status StepCheckSignature::CheckPrivilegeLevel(PrivilegeLevel level) {
std::string error_message;
- if (!context_->is_preload_request.get()) {
+ if (!context_->is_readonly_package.get()) {
if (!ValidatePrivilegeLevel(level, context_->uid.get(),
context_->manifest_data.get()->api_version,
context_->manifest_data.get()->privileges, &error_message)) {
(context_->request_type.get() == ci::RequestType::ManifestDirectInstall ||
context_->request_type.get() == ci::RequestType::ManifestDirectUpdate)))
check_reference = false;
- bool is_preload = context_->is_preload_request.get();
Status status = CheckSignatures(check_reference, &level);
if (status != Status::OK)
return status;
if (status != Status::OK)
return status;
- if (is_preload)
+ if (context_->is_readonly_package.get())
level = PrivilegeLevel::PLATFORM;
/* for update of user apps in 2.4 */
}
if (!RegisterSecurityContextForPath(
context_->pkgid.get(), context_->pkg_path.get(), context_->uid.get(),
- &error_message)) {
+ context_->is_readonly_package.get(), &error_message)) {
if (!error_message.empty()) {
LOG(ERROR) << "error_message: " << error_message;
on_error(Status::SECURITY_ERROR, error_message);
}
if (!RegisterSecurityContextForPath(
context_->pkgid.get(), context_->pkg_path.get(), context_->uid.get(),
- &error_message)) {
+ context_->is_readonly_package.get(), &error_message)) {
if (!error_message.empty()) {
LOG(ERROR) << "error_message: " << error_message;
on_error(Status::SECURITY_ERROR, error_message);
}
if (!RegisterSecurityContextForPath(
context_->pkgid.get(), context_->pkg_path.get(), context_->uid.get(),
- &error_message)) {
+ context_->is_readonly_package.get(), &error_message)) {
if (!error_message.empty()) {
LOG(ERROR) << "error_message: " << error_message;
on_error(Status::SECURITY_ERROR, error_message);
}
if (!RegisterSecurityContextForPath(
context_->pkgid.get(), context_->pkg_path.get(), context_->uid.get(),
- &error_message)) {
+ context_->is_readonly_package.get(), &error_message)) {
if (!error_message.empty()) {
LOG(ERROR) << "error_message: " << error_message;
on_error(Status::SECURITY_ERROR, error_message);
}
if (!RegisterSecurityContextForPath(
context_->pkgid.get(), context_->pkg_path.get(), context_->uid.get(),
- &error_message)) {
+ context_->is_readonly_package.get(), &error_message)) {
if (!error_message.empty()) {
LOG(ERROR) << "error_message: " << error_message;
on_error(Status::SECURITY_ERROR, error_message);
} else {
break;
}
- };
+ }
UserList list;
for (GumUser* guser : GListRange<GumUser*>(gum_user_list)) {
uid_t uid;