consideration about legacy media path.
[platform/core/appfw/pkgmgr-server.git] / src / request.c
index 7fb6e20..c03f602 100644 (file)
@@ -235,7 +235,6 @@ static int __is_admin_user(uid_t uid)
        return 1;
 }
 
-#define REGULAR_USER 5000
 static int __check_caller_permission(uid_t uid,
                GDBusMethodInvocation *invocation, GVariant *parameters)
 {
@@ -321,7 +320,7 @@ static int __handle_request_install(uid_t caller_uid,
                goto catch;
        }
 
-       pkgtype = _get_pkgtype_from_file(pkgpath);
+       pkgtype = _get_pkgtype_from_file(pkgpath, caller_uid);
        if (!pkgtype && arg_pkgtype && strlen(arg_pkgtype))
                pkgtype = (const char *)arg_pkgtype;
        if (pkgtype == NULL) {
@@ -410,7 +409,7 @@ static int __handle_request_mount_install(uid_t caller_uid,
                goto catch;
        }
 
-       pkgtype = _get_pkgtype_from_file(pkgpath);
+       pkgtype = _get_pkgtype_from_file(pkgpath, caller_uid);
        if (!pkgtype && arg_pkgtype && strlen(arg_pkgtype))
                pkgtype = (const char *)arg_pkgtype;
        if (pkgtype == NULL) {