}
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);
}
* 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;