From: sooyeon Date: Tue, 2 Aug 2022 05:55:20 +0000 (+0900) Subject: Remove a logic to check TIDL privileges X-Git-Tag: accepted/tizen/unified/20220802.144742^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F06%2F279106%2F2;p=platform%2Fcore%2Fuifw%2Fvoice-control.git Remove a logic to check TIDL privileges Change-Id: I82f566421225fd7d6e903fe45a7c30592e9fbf6c Signed-off-by: sooyeon --- diff --git a/client/vc.c b/client/vc.c index c61a3f0..2d91a48 100644 --- a/client/vc.c +++ b/client/vc.c @@ -178,28 +178,6 @@ static int __vc_check_privilege() //LCOV_EXCL_STOP } - ret = __check_privilege(uid, VC_PRIVILEGE_DATASHARING); - if (false == ret) { - //LCOV_EXCL_START - SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Permission is denied(%s)(%s)", VC_PRIVILEGE_DATASHARING, uid); - __check_privilege_deinitialize(); - g_privilege_allowed = false; - pthread_mutex_unlock(&g_cynara_mutex); - return VC_ERROR_PERMISSION_DENIED; - //LCOV_EXCL_STOP - } - - ret = __check_privilege(uid, VC_PRIVILEGE_APPMGR); - if (false == ret) { - //LCOV_EXCL_START - SLOG(LOG_ERROR, TAG_VCC, "[ERROR] Permission is denied(%s)(%s)", VC_PRIVILEGE_APPMGR, uid); - __check_privilege_deinitialize(); - g_privilege_allowed = false; - pthread_mutex_unlock(&g_cynara_mutex); - return VC_ERROR_PERMISSION_DENIED; - //LCOV_EXCL_STOP - } - __check_privilege_deinitialize(); } diff --git a/client/vc_mgr.c b/client/vc_mgr.c index 3746242..fcc1c81 100644 --- a/client/vc_mgr.c +++ b/client/vc_mgr.c @@ -246,24 +246,6 @@ static int __vc_mgr_check_privilege() return VC_ERROR_PERMISSION_DENIED; } - ret = __check_privilege(uid, VC_PRIVILEGE_DATASHARING); - if (false == ret) { - SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Permission is denied(%s)(%s)", VC_PRIVILEGE_DATASHARING, uid); - __check_privilege_deinitialize(); - g_privilege_allowed = false; - pthread_mutex_unlock(&g_cynara_mutex); - return VC_ERROR_PERMISSION_DENIED; - } - - ret = __check_privilege(uid, VC_PRIVILEGE_APPMGR); - if (false == ret) { - SLOG(LOG_ERROR, TAG_VCM, "[ERROR] Permission is denied(%s)(%s)", VC_PRIVILEGE_APPMGR, uid); - __check_privilege_deinitialize(); - g_privilege_allowed = false; - pthread_mutex_unlock(&g_cynara_mutex); - return VC_ERROR_PERMISSION_DENIED; - } - __check_privilege_deinitialize(); } diff --git a/common/vc_command.c b/common/vc_command.c index 34138f3..f61a7a5 100644 --- a/common/vc_command.c +++ b/common/vc_command.c @@ -171,28 +171,6 @@ static int __vc_cmd_check_privilege() //LCOV_EXCL_STOP } - ret = __check_privilege(uid, VC_PRIVILEGE_DATASHARING); - if (false == ret) { - //LCOV_EXCL_START - SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Permission is denied(%s)(%s)", VC_PRIVILEGE_DATASHARING, uid); - __check_privilege_deinitialize(); - g_privilege_allowed = false; - pthread_mutex_unlock(&g_cynara_mutex); - return VC_ERROR_PERMISSION_DENIED; - //LCOV_EXCL_STOP - } - - ret = __check_privilege(uid, VC_PRIVILEGE_APPMGR); - if (false == ret) { - //LCOV_EXCL_START - SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Permission is denied(%s)(%s)", VC_PRIVILEGE_APPMGR, uid); - __check_privilege_deinitialize(); - g_privilege_allowed = false; - pthread_mutex_unlock(&g_cynara_mutex); - return VC_ERROR_PERMISSION_DENIED; - //LCOV_EXCL_STOP - } - __check_privilege_deinitialize(); } diff --git a/common/vc_defs.h b/common/vc_defs.h index d9a07b5..e163687 100644 --- a/common/vc_defs.h +++ b/common/vc_defs.h @@ -278,8 +278,6 @@ extern "C" { #define VC_PRIVILEGE_RECORDER "http://tizen.org/privilege/recorder" #define VC_MGR_PRIVILEGE "http://tizen.org/privilege/voicecontrol.manager" -#define VC_PRIVILEGE_DATASHARING "http://tizen.org/privilege/datasharing" -#define VC_PRIVILEGE_APPMGR "http://tizen.org/privilege/appmanager.launch" /****************************************************************************************** * Definitions for common enum diff --git a/server/vce.c b/server/vce.c index 1b4839f..98826b5 100644 --- a/server/vce.c +++ b/server/vce.c @@ -141,28 +141,6 @@ static int __vce_check_privilege() //LCOV_EXCL_STOP } - ret = __check_privilege(uid, VC_PRIVILEGE_DATASHARING); - if (false == ret) { - //LCOV_EXCL_START - SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Permission is denied(%s)(%s)", VC_PRIVILEGE_DATASHARING, uid); - __check_privilege_deinitialize(); - g_privilege_allowed = false; - pthread_mutex_unlock(&g_cynara_mutex); - return VCE_ERROR_PERMISSION_DENIED; - //LCOV_EXCL_STOP - } - - ret = __check_privilege(uid, VC_PRIVILEGE_APPMGR); - if (false == ret) { - //LCOV_EXCL_START - SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Permission is denied(%s)(%s)", VC_PRIVILEGE_APPMGR, uid); - __check_privilege_deinitialize(); - g_privilege_allowed = false; - pthread_mutex_unlock(&g_cynara_mutex); - return VCE_ERROR_PERMISSION_DENIED; - //LCOV_EXCL_STOP - } - __check_privilege_deinitialize(); }