Apply target_uid for GET_PKG_SIZE_INFO_REQ 23/126923/2 accepted/tizen/3.0/common/20170605.123911 accepted/tizen/3.0/ivi/20170605.014958 accepted/tizen/3.0/mobile/20170605.014908 accepted/tizen/3.0/tv/20170605.014925 accepted/tizen/3.0/wearable/20170605.014941 submit/tizen_3.0/20170601.102336
authorjongmyeongko <jongmyeong.ko@samsung.com>
Mon, 24 Apr 2017 13:43:12 +0000 (22:43 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Wed, 26 Apr 2017 00:58:48 +0000 (00:58 +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>
(cherry picked from commit 37666d70a05abbf8d7388e423c18f6a0ed14c849)

src/pkg_cmd.c

index f09ec8d92ca77791d5b4496d1c1e1dbd8533b468..813bd2e357b292f30cf52713a9b4542e2e03ca05 100644 (file)
@@ -1199,9 +1199,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;