summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChanwoo Choi <cw00.choi@samsung.com>2022-09-01 19:10:50 +0900
committerChanwoo Choi <cw00.choi@samsung.com>2022-09-01 19:13:30 +0900
commita8b342aa318d95d043cdff721e80033b82d0b201 (patch)
treeea9bce7bd9ce5f82e04a8e93e223d300d9ba4ce8
parent5483fc2223a9c46eafe501dd6b69d58ecd45c879 (diff)
downloadpass-a8b342aa318d95d043cdff721e80033b82d0b201.tar.gz
pass-a8b342aa318d95d043cdff721e80033b82d0b201.tar.bz2
pass-a8b342aa318d95d043cdff721e80033b82d0b201.zip
lib: resource-monitor: Remove unneeded privilege checksubmit/tizen/20220902.091829accepted/tizen/unified/20220904.214045
commit fccfb02d128c("lib: resource-monitor: Check systemmonitor privilege") added the unneeded privilege check code. In result, cynara is running by preempting CPU resource. So that remove unneeded privilege check code. Only check the privilege when pass_resource_monitor_init() call. Change-Id: I0a9c7b2ca76a781dcf88ab19ddf0ec597c98b6a5 Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
-rw-r--r--lib/resource-monitor/resource-monitor.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/resource-monitor/resource-monitor.c b/lib/resource-monitor/resource-monitor.c
index e7b567e..a7ab07e 100644
--- a/lib/resource-monitor/resource-monitor.c
+++ b/lib/resource-monitor/resource-monitor.c
@@ -128,9 +128,6 @@ static inline int handle_request(struct request_data *data)
if (!data)
return TIZEN_ERROR_INVALID_PARAMETER;
- if (!is_privilege_supported(PRIVILEGE_SYSTEMMONITOR))
- return TIZEN_ERROR_PERMISSION_DENIED;
-
/* Make buffer with struct request_data according to request */
switch (data->request) {
case REQUEST_UPDATE_RESOURCE_ALL:
@@ -343,9 +340,6 @@ int pass_resource_monitor_exit(int id)
{
struct pass_resource_monitor_client *client;
- if (!is_privilege_supported(PRIVILEGE_SYSTEMMONITOR))
- return TIZEN_ERROR_PERMISSION_DENIED;
-
client = find_client_by_id(id);
if (!client) {
_E("[libpass] cannot find client-%d", id);
@@ -518,9 +512,6 @@ static int pass_resource_monitor_get_json(int id, char *json_string, int request
char *buffer;
va_list args;
- if (!is_privilege_supported(PRIVILEGE_SYSTEMMONITOR))
- return TIZEN_ERROR_PERMISSION_DENIED;
-
buffer = malloc(HUGE_BUFF_MAX + 1);
if (!buffer)
return TIZEN_ERROR_OUT_OF_MEMORY;
@@ -720,9 +711,6 @@ pass_resource_monitor_get_array(int id, int res_id, u_int64_t attr_id, int data_
int response_req;
int ret, i;
- if (!is_privilege_supported(PRIVILEGE_SYSTEMMONITOR))
- return TIZEN_ERROR_PERMISSION_DENIED;
-
buffer = malloc(HUGE_BUFF_MAX + 1);
if (!buffer)
return TIZEN_ERROR_OUT_OF_MEMORY;