diff options
-rw-r--r-- | src/wgtpkg-install.c | 1 | ||||
-rw-r--r-- | src/wgtpkg-permissions.c | 10 | ||||
-rw-r--r-- | src/wgtpkg-permissions.h | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/wgtpkg-install.c b/src/wgtpkg-install.c index 7d0c318..c4e70e3 100644 --- a/src/wgtpkg-install.c +++ b/src/wgtpkg-install.c @@ -253,6 +253,7 @@ struct wgt_info *install_widget(const char *wgtfile, const char *root, int force if (!ifo) goto error2; + reset_requested_permissions(); desc = wgt_info_desc(ifo); if (check_widget(desc)) goto error3; diff --git a/src/wgtpkg-permissions.c b/src/wgtpkg-permissions.c index 6aed31f..c341054 100644 --- a/src/wgtpkg-permissions.c +++ b/src/wgtpkg-permissions.c @@ -81,7 +81,15 @@ void reset_permissions() { unsigned int i; for (i = 0 ; i < nrpermissions ; i++) - permissions[i].granted = 0; + permissions[i].granted = permissions[i].requested = 0; +} + +/* remove any requested permission */ +void reset_requested_permissions() +{ + unsigned int i; + for (i = 0 ; i < nrpermissions ; i++) + permissions[i].requested = 0; } /* remove any granting */ diff --git a/src/wgtpkg-permissions.h b/src/wgtpkg-permissions.h index 9a99c4c..5c44974 100644 --- a/src/wgtpkg-permissions.h +++ b/src/wgtpkg-permissions.h @@ -18,6 +18,7 @@ extern int is_standard_permission(const char *name); extern void reset_permissions(); +extern void reset_requested_permissions(); extern void crop_permissions(unsigned level); extern int grant_permission_list(const char *list); extern int permission_exists(const char *name); |