Apply target_uid for GET_PKG_SIZE_INFO_REQ 67/126667/3
authorjongmyeongko <jongmyeong.ko@samsung.com>
Mon, 24 Apr 2017 13:43:12 +0000 (22:43 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Tue, 25 Apr 2017 04:15:50 +0000 (04:15 +0000)
In the root shell, target_uid is assumed as default user.
this is required for the valid calculation of RW directories.

Change-Id: Ia32d2651146afdff1bf7159d8e7ceee3a0982191
Signed-off-by: jongmyeongko <jongmyeong.ko@samsung.com>
src/pkg_cmd.c

index 3fcdd46e1c1d07457b727e481b3dcb4fc7c68129..2ecdd026d08d8c39fd338426f46aed4eac6c29c4 100644 (file)
@@ -1202,9 +1202,13 @@ static int __process_request(uid_t target_uid)
                }
 
                if (strcmp(data.pkgid, PKG_SIZE_INFO_TOTAL) == 0)
-                       ret = pkgmgr_client_get_total_package_size_info(pc, __total_pkg_size_info_recv_cb, NULL);
+                       ret = pkgmgr_client_usr_get_total_package_size_info(pc,
+                               __total_pkg_size_info_recv_cb, NULL,
+                               target_uid);
                else
-                       ret = pkgmgr_client_get_package_size_info(pc, data.pkgid, __pkg_size_info_recv_cb, NULL);
+                       ret = pkgmgr_client_usr_get_package_size_info(pc,
+                               data.pkgid, __pkg_size_info_recv_cb, NULL,
+                               target_uid);
 
                if (ret < 0) {
                        data.result = PKGMGR_INSTALLER_ERR_FATAL_ERROR;