[Non-ACR] removing API causing dbus execution vulnerability 05/241005/1 accepted/tizen/unified/20201201.124742 submit/tizen/20201201.045940
authorAbhishek Vijay <abhishek.v@samsung.com>
Tue, 11 Aug 2020 10:15:57 +0000 (15:45 +0530)
committerAbhishek Vijay <abhishek.v@samsung.com>
Thu, 13 Aug 2020 11:42:06 +0000 (11:42 +0000)
Change-Id: If0759cfb4109c3f5957461404ea779700c5b9dab
Signed-off-by: Abhishek Vijay <abhishek.v@samsung.com>
(cherry picked from commit 64c199a0688e55bb76026e016a07ac55ba316228)

include/context_trigger_internal.h [deleted file]
src/trigger/context_trigger.cpp

diff --git a/include/context_trigger_internal.h b/include/context_trigger_internal.h
deleted file mode 100644 (file)
index 23b5146..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef __TIZEN_CONTEXT_CONTEXT_TRIGGER_INTERNAL_H__
-#define __TIZEN_CONTEXT_CONTEXT_TRIGGER_INTERNAL_H__
-
-#include <glib.h>
-#include <context_trigger.h>
-
-/**
- * @brief              Sets a D-Bus method call as the action of a rule.
- * @since_tizen 2.4
- *
- * @param[in]  rule                    The rule to set the action on
- * @param[in]  bus_name                Destination remote bus name
- * @param[in]  object_path             Path of the remote object
- * @param[in]  interface_name  D-Bus interface to invoke method on
- * @param[in]  method_name             The name of the method to invoke
- * @param[in]  param                   Tuple with parameters for the method,
- *                                                             or @c NULL if not passing parameters.
- *
- * @return             0 on success, otherwise a negative error value
- * @retval             #CONTEXT_TRIGGER_ERROR_NONE                                     Successful
- * @retval             #CONTEXT_TRIGGER_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval             #CONTEXT_TRIGGER_ERROR_PERMISSION_DENIED        Permission denied
- * @retval             #CONTEXT_TRIGGER_ERROR_OUT_OF_MEMORY            Out of memory
- * @retval             #CONTEXT_TRIGGER_ERROR_OPERATION_FAILED         Operation failed
- */
-int context_trigger_rule_set_action_dbus_call(context_trigger_rule_h rule,
-               const char *bus_name, const char *object_path, const char *interface_name,
-               const char *method_name, GVariant *param);
-
-#endif
index b78fc7bcea0ca6848f76a01b5763f50e05172371..001581cbb4f3d0e915d224bc654e5a5510f001d1 100644 (file)
@@ -30,7 +30,6 @@
 #include <ScopeMutex.h>
 #include <job_scheduler_internal.h>
 #include <context_trigger.h>
-#include <context_trigger_internal.h>
 
 #include "PrivilegeChecker.h"
 #include "ContextItem.h"
@@ -590,23 +589,6 @@ EXPORT_API int context_trigger_rule_set_action_notification(context_trigger_rule
        return ret;
 }
 
-//LCOV_EXCL_START
-EXPORT_API int context_trigger_rule_set_action_dbus_call(context_trigger_rule_h rule,
-               const char *bus_name, const char *object_path, const char *interface_name, const char *method_name, GVariant *param)
-{
-       CHECK_CONTEXT_TRIGGER_SUPPORTED(CONTEXT_TRIGGER_FEATURE);
-       ASSERT_NOT_NULL(rule && bus_name && object_path && interface_name && method_name);
-       IF_FAIL_RETURN_TAG(!rule->hasAction, E_INV_RULE, _E, "The rule has an action");
-
-       int ret = ctx_sched_job_set_dbus(rule->job, bus_name, object_path, interface_name, method_name, param);
-
-       if (ret == E_NONE)
-               rule->hasAction = true;
-
-       return ret;
-}
-//LCOV_EXCL_STOP
-
 EXPORT_API int context_trigger_rule_set_description(context_trigger_rule_h rule, const char* description)
 {
        CHECK_CONTEXT_TRIGGER_SUPPORTED(CONTEXT_TRIGGER_FEATURE);