🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.2bsd
Article #329

bug in tar(1) compare option (FIX)

#329
From: Dave Steffens
Date: Wed, 03 Sep 1986 18:48
34 lines
1493 bytes
Subject: bug in tar(1) compare option (FIX)

Index: /usr/src/bin/tar.c

Description:
	The compare (C) option of tar(1) fails to correctly report
	a difference error when a file in the archive is not the same
	length as the corresponding file on the disk.

Repeat-by:
	% echo this is a test >blap
	% tar cvf flap blap
	a blap 1 blocks
	% ls -l blap
	-rw-rw-r-- 1 das      bin           15 Sep  3 14:30 blap
	% tar Cvf flap
	same rw-rw-r-- 11/3      15 Sep  3 14:30 1986 blap
	% echo add another line >>blap
	% ls -l blap
	-rw-rw-r-- 1 das      bin           32 Sep  3 14:30 blap
	% tar Cvf flap
	same rw-rw-r-- 11/3      15 Sep  3 14:30 1986 blap

Fix:
	Make the following change:
	777c777
	< 	if (fstat(ifile, &stbuf2) < 0 || bytes != stbuf.st_size)
	---
	> 	if (fstat(ifile, &stbuf2) < 0 || bytes != stbuf2.st_size)

-- 
{harvard,mit-eddie,think}!eplunix!earvax!das	David Allan Steffens
243 Charles St., Boston, MA 02114		Eaton-Peabody Laboratory
(617) 523-7900 x2748				Mass. Eye & Ear Infirmary
Technical Details
Message-ID: <194@earvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!think!cirl!earvax!das

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!think!cirl!earvax!das
From: das@earvax.UUCP (Dave Steffens)
Newsgroups: net.bugs.2bsd
Subject: bug in tar(1) compare option (FIX)
Message-ID: <194@earvax.UUCP>
Date: Wed, 3-Sep-86 14:48:56 EDT
Article-I.D.: earvax.194
Posted: Wed Sep  3 14:48:56 1986
Date-Received: Thu, 4-Sep-86 22:52:02 EDT
Distribution: net
Organization: Eaton-Peabody, Mass. Eye & Ear
Lines: 34