Add arguments for app control launch 70/247570/1
authorMukunth A <a.mukunth@samsung.com>
Mon, 2 Nov 2020 07:24:47 +0000 (12:54 +0530)
committerMukunth A <a.mukunth@samsung.com>
Thu, 12 Nov 2020 06:23:00 +0000 (06:23 +0000)
Change-Id: I980dff5220793a5de1212d21a796b5a8a570edb1
Signed-off-by: Mukunth A <a.mukunth@samsung.com>
(cherry picked from commit 62b1702d0a1c4032ca0e187de2e3941f7f34dace)

CMain/lib/liborchestration.a
CMain/src/orchestration_service.c
build.sh
patches/injectionchecker.patch [new file with mode: 0644]
patches/orchestration.patch

index 2a190df..4c24144 100644 (file)
Binary files a/CMain/lib/liborchestration.a and b/CMain/lib/liborchestration.a differ
index 48052fc..7751197 100644 (file)
@@ -61,6 +61,10 @@ int app_execute(char *pkg_name, char* args)
         if (ret != APP_CONTROL_ERROR_NONE ) {
                 DEBUG("app_control_set_app_id error");
         }
+       ret = app_control_add_extra_data(ac, APP_CONTROL_DATA_TEXT, args);
+       if (ret != APP_CONTROL_ERROR_NONE ) {
+               DEBUG("app_control_add_extra_data error");
+       }
 
         ret = app_control_send_launch_request(ac, NULL, NULL);
         if (ret != APP_CONTROL_ERROR_NONE) {
index 3ce0225..3b58b1d 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -78,6 +78,7 @@ function submodule_apply_patch() {
     git apply ../patches/capability_test.patch
     git apply ../patches/commands.patch
     git apply ../patches/commandvalidator.patch
+    git apply ../patches/injectionchecker.patch
     git apply ../patches/native.patch
     git apply ../patches/configuremgr.patch
     git apply ../patches/configuremgr_test.patch
diff --git a/patches/injectionchecker.patch b/patches/injectionchecker.patch
new file mode 100644 (file)
index 0000000..3a7fe4b
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/src/common/commandvalidator/injectionchecker/injectionchecker.go b/src/common/commandvalidator/injectionchecker/injectionchecker.go
+index d984029..5688cca 100644
+--- a/src/common/commandvalidator/injectionchecker/injectionchecker.go
++++ b/src/common/commandvalidator/injectionchecker/injectionchecker.go
+@@ -23,7 +23,7 @@ import (
+ var injectionOperators = []string{
+       ";",
+-      "&",
++//    "&",
+       "&&",
+       "||",
+       "'",
index 16d42a1..ccb9287 100644 (file)
@@ -1,5 +1,5 @@
 diff --git a/src/orchestrationapi/orchestration.go b/src/orchestrationapi/orchestration.go
-index 60673bc..5518be7 100644
+index 60673bc..d7b7c01 100644
 --- a/src/orchestrationapi/orchestration.go
 +++ b/src/orchestrationapi/orchestration.go
 @@ -39,7 +39,7 @@ import (
@@ -60,10 +60,13 @@ index 60673bc..5518be7 100644
        resourceMonitorImpl = resourceutil.GetMonitoringInstance()
  
        orcheIns.notificationIns = notification.GetInstance()
-@@ -189,6 +201,19 @@ func (o orcheImpl) Notify(serviceInfo configuremgrtypes.ServiceInfo) {
+@@ -187,6 +199,21 @@ func (o orcheImpl) Notify(serviceInfo configuremgrtypes.ServiceInfo) {
+               log.Println(logtag, "[Error]", err.Error())
+               return
        }
- }
++      o.discoverIns.ForceDiscovery()
++}
++
 +func (o orcheImpl) NotifyRemove(serviceName string) {
 +      validator := commandvalidator.CommandValidator{}
 +      if err := validator.DeleteCommand(serviceName); err != nil {
@@ -75,8 +78,7 @@ index 60673bc..5518be7 100644
 +              log.Println(logtag, "[Error]", err.Error())
 +              return
 +      }
-+}
-+
++      o.discoverIns.ForceDiscovery()
+ }
  // ExecuteAppOnLocal executes a service application on local device
- func (o orcheImpl) ExecuteAppOnLocal(appInfo map[string]interface{}) {
-       o.serviceIns.ExecuteAppOnLocal(appInfo)