Change-Id: Iabf6dfda8008ebe93ce81cf3bab07c2eaef7a99c
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
#define STC_IPTABLES "/usr/sbin/iptables"
#define STC_IP6TABLES "/usr/sbin/ip6tables"
+#define STC_CMD_INSERT "-I"
#define STC_CMD_SIZE 256
#define STC_DEBUG_LOG (stc_util_get_debuglog())
{
stc_app_value_s *app_value = (stc_app_value_s *)value;
remove_pid_context_s *context = (remove_pid_context_s *)data;
- guint pid_count = 0;
if (!g_hash_table_remove(app_value->processes, GUINT_TO_POINTER(context->pid)))
return;
if (pid == 0) {
errno = 0;
+
+ if (!g_strcmp0(args[1], STC_CMD_INSERT)) {
+ STC_LOGE("Invalid arguments");
+ g_strfreev(args);
+ exit(-1);
+ }
+
if (execv(args[0], args) == -1) {
STC_LOGE("Failed to execute [%s]", *err_str);
g_strfreev(args);