diff options
author | Jose Bollo <jose.bollo@iot.bzh> | 2019-09-11 16:23:04 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2020-02-28 12:19:24 +0100 |
commit | 7ea1070ee471141f58e9e4c03df5c95bbcef907d (patch) | |
tree | 0a1478a93095286e4e8a637196956061a9201161 /src/wgtpkg-install.c | |
parent | 0083ad3751cd2b088b5c5d0dea727671ea2a3cca (diff) |
Refactor ALLOW_NO_SIGNATURE compile flag
Fix a tiny bug and minor improvements
Bug-AGL: SPEC-2840
Change-Id: I9b74a8fd604980615d5669219cb5de801de61163
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'src/wgtpkg-install.c')
-rw-r--r-- | src/wgtpkg-install.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/wgtpkg-install.c b/src/wgtpkg-install.c index 386d70b..c7de1f8 100644 --- a/src/wgtpkg-install.c +++ b/src/wgtpkg-install.c @@ -567,7 +567,7 @@ struct wgt_info *install_widget(const char *wgtfile, const char *root, int force struct wgt_info *ifo; const struct wgt_desc *desc; char installdir[PATH_MAX]; - int err; + int err, rc; struct unitconf uconf; NOTICE("-- INSTALLING widget %s to %s --", wgtfile, root); @@ -582,7 +582,12 @@ struct wgt_info *install_widget(const char *wgtfile, const char *root, int force if (zread(wgtfile, 0)) goto error2; - if (check_all_signatures(DEFAULT_ALLOW_NO_SIGNATURE)) +#if defined(ALLOW_NO_SIGNATURE) + rc = check_all_signatures(1); +#else + rc = check_all_signatures(0); +#endif + if (rc) goto error2; ifo = wgt_info_createat(workdirfd, NULL, 1, 1, 1); |