#include <dlfcn.h>
#include <memory>
-
+#include <string>
namespace common_installer {
return true;
}
-bool CheckPrivLevelFromFile(std::string& pkgid, PrivilegeLevel* level) {
+bool CheckPrivLevelFromFile(const std::string& pkgid, PrivilegeLevel* level) {
CertSvcInstance instance;
CertSvcCertificate certificate;
CertSvcVisibility visibility = CERTSVC_VISIBILITY_DEVELOPER;
return false;
}
ret = certsvc_certificate_new_from_memory(instance,
- (const unsigned char *)dist_root.c_str(),
- strlen((char* )dist_root.c_str()),
+ reinterpret_cast<const unsigned char *>(dist_root.c_str()),
+ strlen(dist_root.c_str()),
CERTSVC_FORM_DER_BASE64,
&certificate);
if (ret != CERTSVC_SUCCESS) {
uid_t uid, const char* api_version, GList* privileges,
std::string* error_message);
-bool CheckPrivLevelFromFile(std::string& pkgid, PrivilegeLevel* level);
+bool CheckPrivLevelFromFile(const std::string& pkgid, PrivilegeLevel* level);
bool ValidateMetadataPrivilege(common_installer::PrivilegeLevel level,
const char* api_version, GList* metadata_list,
return backup_path;
}
-bool DeviceSupportedCallback(int storage_id, storage_type_e type,
+bool DeviceSupportedCallback(int, storage_type_e type,
storage_state_e state, const char* path, void* user_data) {
if (type != STORAGE_TYPE_EXTENDED_INTERNAL)
return true;
#include "common/step/pkgmgr/step_register_app.h"
+#include <boost/filesystem.hpp>
+
#include <unistd.h>
#include <cassert>
#include <cstring>
#include <cstdio>
#include <string>
-#include <boost/filesystem.hpp>
-
#include "common/pkgmgr_registration.h"
#include "common/utils/file_util.h"
#include <boost/scope_exit.hpp>
+#include <vector>
+
#include "common/privileges.h"
namespace ci = common_installer;
namespace security {
GList* StepPrivacyPrivilege::GetPrivilege(
- GList* privileges, privilege_manager_package_type_e type)
-{
+ GList* privileges, privilege_manager_package_type_e type) {
GList* privilege = NULL;
if (type == PRVMGR_PACKAGE_TYPE_CORE)
privilege = ci::PrivilegeXToPrivilege(privileges,
{PRVMGR_PACKAGE_TYPE_WRT}
};
- for (auto& type :pType) {
+ for (auto& type : pType) {
GList *privilege = GetPrivilege(privileges, type);
if (privilege) {
int ret = privilege_package_info_set_privacy_privilege(uid, pkgid,
class StepRegisterTrustAnchor : public Step {
public:
enum class RegisterType {
- INSTALL, // Register trust anchor with new package
- UPDATE // Update trust anchor with existing package
+ INSTALL, // Register trust anchor with new package
+ UPDATE // Update trust anchor with existing package
};
explicit StepRegisterTrustAnchor(common_installer::InstallerContext* context,