[DF190403-00436] Allow shared directory as destination path 98/202998/1 accepted/tizen/unified/20190410.002145 submit/tizen/20190408.225946
authorSeonah Moon <seonah1.moon@samsung.com>
Mon, 8 Apr 2019 12:34:28 +0000 (21:34 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Mon, 8 Apr 2019 12:37:37 +0000 (21:37 +0900)
Change-Id: Iade2ccfb783fe1475aae2d5b78b4443a9d2ddf2f

packaging/download-provider.spec
provider/download-provider-security.c

index 56e6a85..c513ffe 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       download-provider
 Summary:    Download the contents in background
-Version:    2.1.110
+Version:    2.1.111
 Release:    0
 Group:      Development/Libraries
 License:    Apache-2.0
index 0128acc..be59667 100644 (file)
@@ -230,6 +230,15 @@ int dp_is_valid_dir(dp_credential cred, const char *dirpath)
                temp = NULL;
        }
 
+       // Check whether directory is shared directory or not.
+       temp = tzplatform_getenv(TZ_USER_SHARE);
+       if (temp) {
+               if (strncmp(resolved_path, temp,
+                                       strlen(temp)) == 0)
+                       return DP_ERROR_NONE;
+               temp = NULL;
+       }
+
        return DP_ERROR_INVALID_DESTINATION;
 }