*/
#include <aul.h>
+#include <cynara-client.h>
+#include <cynara-error.h>
+#include <cynara-session.h>
#include <system_info.h>
#include "vc_client.h"
static int g_feature_enabled = -1;
+static int g_privilege_allowed = -1;
+static cynara *p_cynara = NULL;
+
#if 0
static Ecore_Event_Handler* g_focus_in_hander = NULL;
static Ecore_Event_Handler* g_focus_out_hander = NULL;
return 0;
}
+static int __check_privilege_initialize()
+{
+ int ret = cynara_initialize(&p_cynara, NULL);
+ if (CYNARA_API_SUCCESS != ret)
+ SLOG(LOG_ERROR, TAG_VCC, "[ERROR] fail to initialize");
+
+ return ret == CYNARA_API_SUCCESS;
+}
+
+static int __check_privilege(const char* uid, const char * privilege)
+{
+ FILE *fp = NULL;
+ char smack_label[1024] = "/proc/self/attr/current";
+
+ if (!p_cynara) {
+ return false;
+ }
+
+ fp = fopen(smack_label, "r");
+ if (fp != NULL) {
+ if (fread(smack_label, 1, sizeof(smack_label), fp) <= 0)
+ SLOG(LOG_ERROR, TAG_VCC, "[ERROR] fail to fread");
+
+ fclose(fp);
+ }
+
+ pid_t pid = getpid();
+ char *session = cynara_session_from_pid(pid);
+ int ret = cynara_check(p_cynara, smack_label, session, uid, privilege);
+ SLOG(LOG_DEBUG, TAG_VCC, "[Client]cynara_check returned %d(%s)", ret, (CYNARA_API_ACCESS_ALLOWED == ret) ? "Allowed" : "Denied");
+ if (session)
+ free(session);
+
+ if (ret != CYNARA_API_ACCESS_ALLOWED)
+ return false;
+ return true;
+}
+
+static void __check_privilege_deinitialize()
+{
+ if (p_cynara)
+ cynara_finish(p_cynara);
+ p_cynara = NULL;
+}
+
+static int __vc_check_privilege()
+{
+ char uid[16];
+
+ if (0 == g_privilege_allowed) {
+ SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Permission is denied");
+ return VC_ERROR_PERMISSION_DENIED;
+ } else if (-1 == g_privilege_allowed) {
+ if (false == __check_privilege_initialize()){
+ SLOG(LOG_ERROR, TAG_VCC, "[ERROR] privilege initialize is failed");
+ return VC_ERROR_PERMISSION_DENIED;
+ }
+ snprintf(uid, 16, "%d", getuid());
+ if (false == __check_privilege(uid, VC_PRIVILEGE)) {
+ SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Permission is denied");
+ g_privilege_allowed = 0;
+ __check_privilege_deinitialize();
+ return VC_ERROR_PERMISSION_DENIED;
+ }
+ __check_privilege_deinitialize();
+ }
+
+ g_privilege_allowed = 1;
+ return VC_ERROR_NONE;
+}
+
static const char* __vc_get_error_code(vc_error_e err)
{
switch (err) {
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
SLOG(LOG_DEBUG, TAG_VCC, "===== [Client] Initialize");
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
SLOG(LOG_DEBUG, TAG_VCC, "===== [Client] Deinitialize");
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
SLOG(LOG_DEBUG, TAG_VCC, "===== [Client] Prepare");
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
SLOG(LOG_DEBUG, TAG_VCC, "===== [Client] Unprepare");
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
SLOG(LOG_DEBUG, TAG_VCC, "===== [Client] Foreach Supported Language");
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
SLOG(LOG_DEBUG, TAG_VCC, "===== [Client] Get Current Language");
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
SLOG(LOG_DEBUG, TAG_VCC, "===== [Client] Get State");
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
SLOG(LOG_DEBUG, TAG_VCC, "===== [Client] Get Service State");
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
SLOG(LOG_DEBUG, TAG_VCC, "===== [Client] Set Command list");
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
SLOG(LOG_DEBUG, TAG_VCC, "===== [Client] Unset Command list");
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
SLOG(LOG_DEBUG, TAG_VCC, "===== [Client] Set exclusive command");
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == callback)
return VC_ERROR_INVALID_PARAMETER;
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
vc_state_e state;
if (0 != vc_client_get_client_state(g_vc, &state)) {
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == callback)
return VC_ERROR_INVALID_PARAMETER;
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
vc_state_e state;
if (0 != vc_client_get_client_state(g_vc, &state)) {
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (callback == NULL)
return VC_ERROR_INVALID_PARAMETER;
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
vc_state_e state;
if (0 != vc_client_get_client_state(g_vc, &state)) {
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == callback)
return VC_ERROR_INVALID_PARAMETER;
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
vc_state_e state;
if (0 != vc_client_get_client_state(g_vc, &state)) {
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == callback)
return VC_ERROR_INVALID_PARAMETER;
if (0 != __vc_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
vc_state_e state;
if (0 != vc_client_get_client_state(g_vc, &state)) {
* limitations under the License.
*/
-
+#include <cynara-client.h>
+#include <cynara-error.h>
+#include <cynara-session.h>
#include <libintl.h>
#include <stdlib.h>
#include <system_info.h>
static int g_feature_enabled = -1;
+static int g_privilege_allowed = -1;
+static cynara *p_cynara = NULL;
+
static int __vc_cmd_get_feature_enabled()
{
if (0 == g_feature_enabled) {
- SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Voice control feature NOT supported");
+ SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Voice control feature NOT supported");
return VC_ERROR_NOT_SUPPORTED;
} else if (-1 == g_feature_enabled) {
bool vc_supported = false;
if (0 == system_info_get_platform_bool(VC_FEATURE_PATH, &vc_supported)) {
if (0 == system_info_get_platform_bool(VC_MIC_FEATURE_PATH, &mic_supported)) {
if (false == vc_supported || false == mic_supported) {
- SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Voice control feature NOT supported");
+ SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Voice control feature NOT supported");
g_feature_enabled = 0;
return VC_ERROR_NOT_SUPPORTED;
}
g_feature_enabled = 1;
} else {
- SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Fail to get feature value");
+ SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Fail to get feature value");
return VC_ERROR_NOT_SUPPORTED;
}
} else {
- SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Fail to get feature value");
+ SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Fail to get feature value");
return VC_ERROR_NOT_SUPPORTED;
}
}
return 0;
}
+static int __check_privilege_initialize()
+{
+ int ret = cynara_initialize(&p_cynara, NULL);
+ if (CYNARA_API_SUCCESS != ret)
+ SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] fail to initialize");
+
+ return ret == CYNARA_API_SUCCESS;
+}
+
+static int __check_privilege(const char* uid, const char * privilege)
+{
+ FILE *fp = NULL;
+ char smack_label[1024] = "/proc/self/attr/current";
+
+ if (!p_cynara) {
+ return false;
+ }
+
+ fp = fopen(smack_label, "r");
+ if (fp != NULL) {
+ if (fread(smack_label, 1, sizeof(smack_label), fp) <= 0)
+ SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] fail to fread");
+
+ fclose(fp);
+ }
+
+ pid_t pid = getpid();
+ char *session = cynara_session_from_pid(pid);
+ int ret = cynara_check(p_cynara, smack_label, session, uid, privilege);
+ SLOG(LOG_DEBUG, TAG_VCCMD, "[Client]cynara_check returned %d(%s)", ret, (CYNARA_API_ACCESS_ALLOWED == ret) ? "Allowed" : "Denied");
+ if (session)
+ free(session);
+
+ if (ret != CYNARA_API_ACCESS_ALLOWED)
+ return false;
+ return true;
+}
+
+static void __check_privilege_deinitialize()
+{
+ if (p_cynara)
+ cynara_finish(p_cynara);
+ p_cynara = NULL;
+}
+
+static int __vc_cmd_check_privilege()
+{
+ char uid[16];
+ int ret = -1;
+
+ if (0 == g_privilege_allowed) {
+ SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Permission is denied");
+ return VC_ERROR_PERMISSION_DENIED;
+ } else if (-1 == g_privilege_allowed) {
+ if (false == __check_privilege_initialize()){
+ SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] privilege initialize is failed");
+ return VC_ERROR_PERMISSION_DENIED;
+ }
+ snprintf(uid, 16, "%d", getuid());
+ if (false == __check_privilege(uid, VC_PRIVILEGE)) {
+ SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Permission is denied");
+ g_privilege_allowed = 0;
+ __check_privilege_deinitialize();
+ return VC_ERROR_PERMISSION_DENIED;
+ }
+ __check_privilege_deinitialize();
+ }
+
+ g_privilege_allowed = 1;
+ return VC_ERROR_NONE;
+}
+
int vc_cmd_list_create(vc_cmd_list_h* vc_cmd_list)
{
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_cmd_list) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_cmd_list) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_cmd_list || NULL == count) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Get command count : Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_cmd_list || NULL == vc_command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_cmd_list || NULL == vc_command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
SLOG(LOG_DEBUG, TAG_VCCMD, "===== Destroy all command");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_cmd_list) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == original) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_cmd_list) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_cmd_list) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_cmd_list) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_cmd_list) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_cmd_list || NULL == vc_command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Input parameter is NULL");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command || NULL == id) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid handle ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command || NULL == command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid handle ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command || NULL == command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid handle ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command || NULL == type) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command || NULL == format) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command || NULL == pid) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");
if (0 != __vc_cmd_get_feature_enabled()) {
return VC_ERROR_NOT_SUPPORTED;
}
+ if (0 != __vc_cmd_check_privilege()) {
+ return VC_ERROR_PERMISSION_DENIED;
+ }
if (NULL == vc_command || NULL == domain) {
SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");