const std::string& author_id, const std::string& api_version,
const boost::filesystem::path& path,
uid_t uid, const std::vector<std::string>& privileges,
- app_inst_req* req, bool /*cross_app_rules*/, std::string* error_message) {
+ app_inst_req* req, bool cross_app_rules, std::string* error_message) {
if (app_id.empty() || pkg_id.empty()) {
LOG(ERROR) << "Appid or pkgid is empty. Both values must be set";
return false;
return false;
}
- // TODO(t.iwanek): set is_hybrid in request according to cross_app_rules var
-
error = security_manager_app_inst_req_set_uid(req, uid);
if (error != SECURITY_MANAGER_SUCCESS) {
std::string errnum = boost::str(boost::format("%d") % error);
return false;
}
+ if (cross_app_rules) {
+ 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 += ":<" + errnum + ">";
+ return false;
+ }
+ }
+
if (!api_version.empty()) {
error = security_manager_app_inst_req_set_target_version(req,
api_version.c_str());