aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2001-12-05 20:42:52 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2001-12-05 20:42:52 +0000
commit016298551c086bb18a68c41ab1ad2c80bc0f4005 (patch)
treef821874ee26056363c31581807ac83de4bf3bf71 /sbin
parent65bbadfbbc492a65ec6daf676ff0ebeb766c9cc3 (diff)
downloadsrc-016298551c086bb18a68c41ab1ad2c80bc0f4005.tar.gz
src-016298551c086bb18a68c41ab1ad2c80bc0f4005.zip
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>
Notes
Notes: svn path=/head/; revision=87413
Diffstat (limited to 'sbin')
-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 6ed98adc629b..f948dd220737 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 {