From: Tomasz Swierczek Date: Fri, 13 Dec 2024 12:24:23 +0000 (+0100) Subject: Change process_type elements with additional prefix X-Git-Tag: accepted/tizen/unified/20241216.010927~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fecfbfa4b0406d698513d670b20f9874e17032bc;p=platform%2Fcore%2Fsecurity%2Fsecurity-manager.git Change process_type elements with additional prefix askuser-notification couldn't be built because of ambiguity in the APIs/enums. Also, added missing header. Change-Id: I1dbc4ef6cac4cdf74db200b85b790424d3b03ee4 --- diff --git a/src/client/client-security-manager.cpp b/src/client/client-security-manager.cpp index 6142d08b..0b7d86f9 100644 --- a/src/client/client-security-manager.cpp +++ b/src/client/client-security-manager.cpp @@ -2284,19 +2284,19 @@ int security_manager_set_identity( } security_manager_pre_check(); switch (type) { - case (process_type::SYSTEM): + case (process_type::SM_PROCESS_TYPE_SYSTEM): if (smack_set_label_for_self(SMACK_SYSTEM.c_str()) != 0) { LogError("Failed to set smack label" << SMACK_SYSTEM << "for current process"); return SECURITY_MANAGER_ERROR_UNKNOWN; } return SECURITY_MANAGER_SUCCESS; - case (process_type::SYSTEM_PRIVILEGED): + case (process_type::SM_PROCESS_TYPE_SYSTEM_PRIVILEGED): if (smack_set_label_for_self(SMACK_SYSTEM_PRIVILEGED.c_str()) != 0) { LogError("Failed to set smack label" << SMACK_SYSTEM_PRIVILEGED << "for current process"); return SECURITY_MANAGER_ERROR_UNKNOWN; } return SECURITY_MANAGER_SUCCESS; - case (process_type::APP): + case (process_type::SM_PROCESS_TYPE_APP): return security_manager_set_process_label_from_appid(app_id); } diff --git a/src/include/app-runtime.h b/src/include/app-runtime.h index 4ce09931..e78038a4 100644 --- a/src/include/app-runtime.h +++ b/src/include/app-runtime.h @@ -23,6 +23,7 @@ #include "security-manager-types.h" +#include #include #ifdef __cplusplus diff --git a/src/include/security-manager-types.h b/src/include/security-manager-types.h index b54f164a..68252e0b 100644 --- a/src/include/security-manager-types.h +++ b/src/include/security-manager-types.h @@ -137,9 +137,9 @@ typedef enum app_defined_privilege_type app_defined_privilege_type; * This enum defines the process type. */ enum process_type { - SYSTEM = 0, - SYSTEM_PRIVILEGED, - APP, + SM_PROCESS_TYPE_SYSTEM = 0, + SM_PROCESS_TYPE_SYSTEM_PRIVILEGED, + SM_PROCESS_TYPE_APP, }; typedef enum process_type process_type;