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>
This commit is contained in:
obrien 2001-12-05 20:42:52 +00:00
parent 17d2cb0472
commit a309513250

View File

@ -340,12 +340,15 @@ searchdir(ino, blkno, size, filesize, tapesize, nodump)
ip = getino(dp->d_ino); ip = getino(dp->d_ino);
if (TSTINO(dp->d_ino, dumpinomap)) { if (TSTINO(dp->d_ino, dumpinomap)) {
CLRINO(dp->d_ino, dumpinomap); CLRINO(dp->d_ino, dumpinomap);
CLRINO(dp->d_ino, usedinomap);
*tapesize -= blockest(ip); *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) { if ((ip->di_mode & IFMT) == IFDIR) {
SETINO(dp->d_ino, dumpdirmap); SETINO(dp->d_ino, dumpdirmap);
CLRINO(dp->d_ino, usedinomap);
ret |= HASSUBDIRS; ret |= HASSUBDIRS;
} }
} else { } else {