summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/wgtpkg-install.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/wgtpkg-install.c b/src/wgtpkg-install.c
index 31c9e91..93c2bbc 100644
--- a/src/wgtpkg-install.c
+++ b/src/wgtpkg-install.c
@@ -129,12 +129,12 @@ static int set_required_permissions(struct wgt_desc_param *params, int required)
return 0;
}
-static int check_widget(const struct wgt_desc *desc)
+static int check_permissions(const struct wgt_desc *desc)
{
int result;
const struct wgt_desc_feature *feature;
- result = check_temporary_constraints(desc);
+ result = 0;
feature = desc->features;
while(result >= 0 && feature) {
if (!strcmp(feature->name, feature_required_permission))
@@ -144,6 +144,16 @@ static int check_widget(const struct wgt_desc *desc)
return result;
}
+static int check_widget(const struct wgt_desc *desc)
+{
+ int result;
+
+ result = check_temporary_constraints(desc);
+ if (result >= 0)
+ result = check_permissions(desc);
+ return result;
+}
+
static int get_target_directory(char target[PATH_MAX], const char *root, const struct wgt_desc *desc)
{
int rc;