bostic@OKEEFFE.BERKELEY.EDU (Keith Bostic) (12/14/90)
Subject: 4.3BSD-Reno fsck fix Index: sbin/fsck/pass2.c 4.3BSD-Reno Description: There is an uninitialized variable in the version of fsck(8) distributed with 4.3BSD-Reno which can cause fsck to destroy the file system instead of repair it. Note, this problem is ONLY found in 4.3BSD-Reno systems. Fix: Apply the following patch: *** fsck/pass2.c.old Fri Dec 7 16:08:58 1990 --- fsck/pass2.c.new Fri Dec 7 16:06:25 1990 *************** *** 18,24 **** */ #ifndef lint ! static char sccsid[] = "@(#)pass2.c 5.15 (Berkeley) 7/27/90"; #endif /* not lint */ #include <sys/param.h> --- 18,24 ---- */ #ifndef lint ! static char sccsid[] = "@(#)pass2.c 5.16 (Berkeley) 9/18/90"; #endif /* not lint */ #include <sys/param.h> *************** *** 100,105 **** --- 100,106 ---- bzero((char *)&curino, sizeof(struct inodesc)); curino.id_type = DATA; curino.id_func = pass2check; + dino.di_mode = IFDIR; dp = &dino; inpend = &inpsort[inplast]; for (inpp = inpsort; inpp < inpend; inpp++) {