summaryrefslogtreecommitdiffstats
path: root/sbin/restore
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2000-07-16 23:22:15 +0000
committerdwmalone <dwmalone@FreeBSD.org>2000-07-16 23:22:15 +0000
commite16e26fada5ff2253fc0408b159f8041f2fb3b56 (patch)
treef12542270c167824e5555555f699310874c48222 /sbin/restore
parent5996cf5b9eed4a31cafa5c091e8a90a29ba7e953 (diff)
downloadFreeBSD-src-e16e26fada5ff2253fc0408b159f8041f2fb3b56.zip
FreeBSD-src-e16e26fada5ff2253fc0408b159f8041f2fb3b56.tar.gz
Don't try to make files immutable (ie. chflags) before setting access times.
PR: 19973 Submitted by: Arjan de Vet <Arjan.deVet@adv.iae.nl> Reviewed by: Matthew Jacob <mjacob@feral.com>
Diffstat (limited to 'sbin/restore')
-rw-r--r--sbin/restore/dirs.c2
-rw-r--r--sbin/restore/tape.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c
index 6338c24..f30eacd 100644
--- a/sbin/restore/dirs.c
+++ b/sbin/restore/dirs.c
@@ -631,8 +631,8 @@ setdirmodes(flags)
cp = myname(ep);
(void) chown(cp, node.uid, node.gid);
(void) chmod(cp, node.mode);
- (void) chflags(cp, node.flags);
utimes(cp, node.timep);
+ (void) chflags(cp, node.flags);
ep->e_flags &= ~NEW;
}
}
diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c
index ed3258b..21ac8b1 100644
--- a/sbin/restore/tape.c
+++ b/sbin/restore/tape.c
@@ -581,9 +581,9 @@ extractfile(name)
}
(void) chown(name, curfile.dip->di_uid, curfile.dip->di_gid);
(void) chmod(name, mode);
+ utimes(name, timep);
(void) chflags(name, flags);
skipfile();
- utimes(name, timep);
return (GOOD);
case IFCHR:
@@ -603,9 +603,9 @@ extractfile(name)
}
(void) chown(name, curfile.dip->di_uid, curfile.dip->di_gid);
(void) chmod(name, mode);
+ utimes(name, timep);
(void) chflags(name, flags);
skipfile();
- utimes(name, timep);
return (GOOD);
case IFREG:
@@ -625,10 +625,10 @@ extractfile(name)
}
(void) fchown(ofile, curfile.dip->di_uid, curfile.dip->di_gid);
(void) fchmod(ofile, mode);
- (void) fchflags(ofile, flags);
getfile(xtrfile, xtrskip);
(void) close(ofile);
utimes(name, timep);
+ (void) chflags(name, flags);
return (GOOD);
}
/* NOTREACHED */
OpenPOWER on IntegriCloud