summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
authorgraham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2011-02-13 21:47:09 (EST)
committer graham.gower@gmail.com <graham.gower@gmail.com@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>2011-02-13 21:47:09 (EST)
commitf5072b06fadc446ce4579ac6c8b0b9bfa3d55625 (patch)
tree2f8eed3626c5af9872f10e7d9335d1b652d29bcd /libopkg
parenta28f22ee5c9f868c733572048bbbb1217957507b (diff)
Delete package sources that fail the signature check.
From Bernhard Guillon. git-svn-id: http://opkg.googlecode.com/svn/trunk@603 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/opkg_cmd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c
index 29ae0cd..4059bb7 100644
--- a/libopkg/opkg_cmd.c
+++ b/libopkg/opkg_cmd.c
@@ -182,6 +182,12 @@ opkg_update_cmd(int argc, char **argv)
else
opkg_msg(NOTICE, "Signature check failed.\n");
}
+ if (err) {
+ /* The signature was wrong so delete it */
+ opkg_msg(NOTICE, "Remove wrong Signature file.\n");
+ unlink (tmp_file_name);
+ unlink (list_file_name);
+ }
/* We shouldn't unlink the signature ! */
// unlink (tmp_file_name);
free (tmp_file_name);