summaryrefslogtreecommitdiffstats
path: root/sbin/dump
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-12-05 20:42:52 +0000
committerobrien <obrien@FreeBSD.org>2001-12-05 20:42:52 +0000
commitc404d987fa7b4ed3324e5f5b3b7f3c81d62e956a (patch)
treef821874ee26056363c31581807ac83de4bf3bf71 /sbin/dump
parent754ad10054ccaf7af4888582e460d771052e0077 (diff)
downloadFreeBSD-src-c404d987fa7b4ed3324e5f5b3b7f3c81d62e956a.zip
FreeBSD-src-c404d987fa7b4ed3324e5f5b3b7f3c81d62e956a.tar.gz
Files in subdirectories of directories that have the nodump flag set
are sometimes incorrectly being dumped. The problem arises because the subdirectory only gets its entry cleared from usedinomap if it is also present in dumpinomap, and it is the absence of a directory in usedinomap that internally indicates that the directory is under the effects of UF_NODUMP (either directly or inherited). PR: 32414 Submitted by: David C Lawrence <tale@dd.org>
Diffstat (limited to 'sbin/dump')
-rw-r--r--sbin/dump/traverse.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c
index 6ed98ad..f948dd2 100644
--- a/sbin/dump/traverse.c
+++ b/sbin/dump/traverse.c
@@ -340,12 +340,15 @@ searchdir(ino, blkno, size, filesize, tapesize, nodump)
ip = getino(dp->d_ino);
if (TSTINO(dp->d_ino, dumpinomap)) {
CLRINO(dp->d_ino, dumpinomap);
- CLRINO(dp->d_ino, usedinomap);
*tapesize -= blockest(ip);
}
- /* Add back to dumpdirmap to propagate nodump. */
+ /*
+ * Add back to dumpdirmap and remove from usedinomap
+ * to propagate nodump.
+ */
if ((ip->di_mode & IFMT) == IFDIR) {
SETINO(dp->d_ino, dumpdirmap);
+ CLRINO(dp->d_ino, usedinomap);
ret |= HASSUBDIRS;
}
} else {
OpenPOWER on IntegriCloud