summaryrefslogtreecommitdiffstats
path: root/sbin/dump
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2003-11-04 14:20:14 +0000
committeriedowse <iedowse@FreeBSD.org>2003-11-04 14:20:14 +0000
commit9295c1ca712c220aa8e5ae69ed3d287eeb4ea9df (patch)
tree30e62ae627684fa8054fd865894691fef6be27d4 /sbin/dump
parent6c2d58b0b2656d0b4dcdaeddcff7c47cec968774 (diff)
downloadFreeBSD-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/dump')
-rw-r--r--sbin/dump/traverse.c6
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;
}
OpenPOWER on IntegriCloud