Remove calling getpgid function 44/189444/1
authorHwankyu Jhun <h.jhun@samsung.com>
Tue, 18 Sep 2018 01:06:25 +0000 (10:06 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Tue, 18 Sep 2018 01:06:25 +0000 (10:06 +0900)
Before AMD sends the result, AMD gets the process group ID of the callee
process. Getting pgid in the caller side is not necessary.
If the app process gets the process group ID of the callee, SMACK issue
is occurred.

Change-Id: Ie61c9abd8a0051cac8b3355b1d38c88ab29d4c85
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launch_with_result.c

index 21e471b..36ba302 100644 (file)
@@ -135,7 +135,6 @@ static int __call_app_result_callback(bundle *kb, int is_cancel,
 {
        app_resultcb_info_t *new_info;
        app_resultcb_info_t *info;
-       int pgid;
        const char *fwdpid_str;
        const char *num_str;
        int num;
@@ -156,20 +155,7 @@ static int __call_app_result_callback(bundle *kb, int is_cancel,
        if (!info || launched_pid < 0) {
                _E("reject by pid - wait pid = %d, recvd pid = %d",
                                getpid(), launched_pid);
-
-               /* second chance - support app launched by shell script*/
-               pgid = getpgid(launched_pid);
-               if (pgid <= 1) {
-                       _E("Failed to get process group id. launched_pid(%d)",
-                                       launched_pid);
-                       return -1;
-               }
-
-               info = __find_resultcb(pgid, num);
-               if (!info) {
-                       _E("second chance : also reject pgid - %d", pgid);
-                       return -1;
-               }
+               return -1;
        }
 
        if (info->reply_cb == NULL) {