diff options
author | dd <dd@FreeBSD.org> | 2001-08-20 02:15:22 +0000 |
---|---|---|
committer | dd <dd@FreeBSD.org> | 2001-08-20 02:15:22 +0000 |
commit | 333eb2bebd732db7b09d345fc820beb59f089651 (patch) | |
tree | 43ec760554d3f7b9fa7ce339acb7aee6c2d0966f /sbin/restore/dirs.c | |
parent | c9d6bbb3f63c406f2289698cc8bbcdd140bd6e46 (diff) | |
download | FreeBSD-src-333eb2bebd732db7b09d345fc820beb59f089651.zip FreeBSD-src-333eb2bebd732db7b09d345fc820beb59f089651.tar.gz |
Respect the -N flag when changing directory attributes in setdirmode).
PR: 29671
Submitted by: Sascha Blank <sblank@addcom.de>
Diffstat (limited to 'sbin/restore/dirs.c')
-rw-r--r-- | sbin/restore/dirs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c index c61737a..e822f5d 100644 --- a/sbin/restore/dirs.c +++ b/sbin/restore/dirs.c @@ -636,10 +636,12 @@ setdirmodes(flags) panic("cannot find directory inode %d\n", node.ino); } else { cp = myname(ep); - (void) chown(cp, node.uid, node.gid); - (void) chmod(cp, node.mode); - utimes(cp, node.timep); - (void) chflags(cp, node.flags); + if (!Nflag) { + (void) chown(cp, node.uid, node.gid); + (void) chmod(cp, node.mode); + utimes(cp, node.timep); + (void) chflags(cp, node.flags); + } ep->e_flags &= ~NEW; } } |