summaryrefslogtreecommitdiffstats
path: root/usr.bin/fetch/ftp.c
diff options
context:
space:
mode:
authorcracauer <cracauer@FreeBSD.org>2000-03-08 13:02:11 +0000
committercracauer <cracauer@FreeBSD.org>2000-03-08 13:02:11 +0000
commit1a6acdd95fbe8b2547544db42a78d77f65da9924 (patch)
tree1f681fd05aaafb6597069f9e3a9ef09c35f2602f /usr.bin/fetch/ftp.c
parentce4fd272577d7c5ecf7b29ac297959663b5ba67a (diff)
downloadFreeBSD-src-1a6acdd95fbe8b2547544db42a78d77f65da9924.zip
FreeBSD-src-1a6acdd95fbe8b2547544db42a78d77f65da9924.tar.gz
Print a warning and exit with != 0 when at least one downloaded file
is shorter than previously announced by the server. Tested by asami. Approved by: jkh
Diffstat (limited to 'usr.bin/fetch/ftp.c')
-rw-r--r--usr.bin/fetch/ftp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/fetch/ftp.c b/usr.bin/fetch/ftp.c
index 922887b..7abab35 100644
--- a/usr.bin/fetch/ftp.c
+++ b/usr.bin/fetch/ftp.c
@@ -514,7 +514,8 @@ ftp_retrieve(struct fetch_state *fs)
fclose(local);
fclose(remote);
fclose(ftp);
- display(fs, size, -1);
+ if (display(fs, size, -1) != 0)
+ return EX_PROTOCOL;
adjmodtime(fs);
return 0;
}
OpenPOWER on IntegriCloud