summaryrefslogtreecommitdiff
path: root/svc
diff options
context:
space:
mode:
Diffstat (limited to 'svc')
-rwxr-xr-xsvc/media_controller_db_util.c2
-rwxr-xr-xsvc/media_controller_svc.c10
2 files changed, 11 insertions, 1 deletions
diff --git a/svc/media_controller_db_util.c b/svc/media_controller_db_util.c
index b504309..9d67aa8 100755
--- a/svc/media_controller_db_util.c
+++ b/svc/media_controller_db_util.c
@@ -53,7 +53,7 @@ static int __mc_foreach_table_list(void *handle, GList **list)
mc_debug("table_name: %s", table_name);
if (MC_STRING_VALID(table_name)) {
- (*list) = g_list_append((*list), strdup(table_name));
+ (*list) = g_list_append((*list), table_name);
}
}
diff --git a/svc/media_controller_svc.c b/svc/media_controller_svc.c
index e943ccf..71b910b 100755
--- a/svc/media_controller_svc.c
+++ b/svc/media_controller_svc.c
@@ -139,6 +139,16 @@ gboolean _mc_read_service_request_tcp_socket(GIOChannel *src, GIOCondition condi
}
}
} else if (recv_msg.msg_type == MC_MSG_SERVER_CONNECTION) {
+ ret = __mc_privilege_ask(client_sock, "mediacontroller::svc", "w");
+ if (ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ ret = __mc_privilege_ask(client_sock, "mediacontroller::svc", "r");
+ if (ret != MEDIA_CONTROLLER_ERROR_NONE) {
+ mc_error("permission is denied!");
+
+ send_msg = MEDIA_CONTROLLER_ERROR_PERMISSION_DENIED;
+ goto ERROR;
+ }
+ }
if((recv_msg.msg_size > 0) && (recv_msg.msg != NULL)) {
if (strncmp(recv_msg.msg, MC_SERVER_CONNECTION_MSG, recv_msg.msg_size) == 0) {
if(g_connection_cnt == -1)