diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-09-01 10:41:56 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-09-01 10:41:56 +0000 |
commit | b35874d703e175bc2b9c6a7e3f925a31d7448dc8 (patch) | |
tree | 9c81c40e6282f16e290d89c4f38f0b6347545beb /usr.sbin/pkg_add/OpenBSD | |
parent | 7ed0b60199efc1671e58463de1c421cf0fd3de86 (diff) |
be a wee bit more paranoid about file sizes.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/ArcCheck.pm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm index 631ad74403a..5e49e349075 100644 --- a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm +++ b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: ArcCheck.pm,v 1.26 2014/08/10 10:01:03 espie Exp $ +# $OpenBSD: ArcCheck.pm,v 1.27 2014/09/01 10:41:55 espie Exp $ # # Copyright (c) 2005-2006 Marc Espie <espie@openbsd.org> # @@ -82,6 +82,17 @@ sub verify_modes $result = 0; } } + if ($o->isFile) { + if (!defined $item->{size}) { + $o->errsay("Error: file #1 does not have recorded size", + $item->fullname); + $result = 0; + } elsif ($item->{size} != $o->{size}) { + $o->errsay("Error: size does not match for #1", + $item->fullname); + $result = 0; + } + } return $result; } |