diff options
author | iedowse <iedowse@FreeBSD.org> | 2003-11-04 14:20:14 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2003-11-04 14:20:14 +0000 |
commit | 9295c1ca712c220aa8e5ae69ed3d287eeb4ea9df (patch) | |
tree | 30e62ae627684fa8054fd865894691fef6be27d4 /sbin | |
parent | 6c2d58b0b2656d0b4dcdaeddcff7c47cec968774 (diff) | |
download | FreeBSD-src-9295c1ca712c220aa8e5ae69ed3d287eeb4ea9df.zip FreeBSD-src-9295c1ca712c220aa8e5ae69ed3d287eeb4ea9df.tar.gz |
In mapdirs(), do not use the `dp' inode pointer after searchdir()
has been called, since it points to a shared inode buffer that may
be overwritten. The two cases where `dp' was used incorrectly appear
to have been overlooked when "nodump" inheritance was first added
in revision 1.12.
This is reported to correct propagation of the nodump flag on
directories that are larger than one block in size.
PR: bin/58912
Submitted by: Volker Paepcke <vpaepcke@incore.de>
MFC after: 1 week
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/dump/traverse.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index 0fd10c4..d05319a 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -274,8 +274,8 @@ mapdirs(ino_t maxino, long *tapesize) for (ret = 0, i = 0; filesize > 0 && i < NDADDR; i++) { if (DIP(&di, di_db[i]) != 0) ret |= searchdir(ino, DIP(&di, di_db[i]), - (long)sblksize(sblock, DIP(dp, di_size), i), - filesize, tapesize, nodump); + (long)sblksize(sblock, DIP(&di, di_size), + i), filesize, tapesize, nodump); if (ret & HASDUMPEDFILE) filesize = 0; else @@ -289,7 +289,7 @@ mapdirs(ino_t maxino, long *tapesize) } if (ret & HASDUMPEDFILE) { SETINO(ino, dumpinomap); - *tapesize += blockest(dp); + *tapesize += blockest(&di); change = 1; continue; } |