bin/39849: /sbin/restore fails to overwrite files with schg
flag set
Nicolas Rachinsky
nicolas-2007 at rachinsky.de
Thu May 24 20:30:24 UTC 2007
The following reply was made to PR bin/39849; it has been noted by GNATS.
From: Nicolas Rachinsky <nicolas-2007 at rachinsky.de>
To: cjclark at alum.mit.edu
Cc: bug-followup at FreeBSD.org, mad1 at tapil.com
Subject: Re: bin/39849: /sbin/restore fails to overwrite files with schg
flag set
Date: Thu, 24 May 2007 22:23:56 +0200
* "Crist J. Clark" <cristclark at comcast.net> [2007-05-24 12:53 -0700]:
> On Thu, May 24, 2007 at 02:26:21PM +0200, Nicolas Rachinsky wrote:
> > >Before a restore(8) is fairly trivial.
> >
> > But restore does not set all the flags again.
> >
> > So you either have to loose some flags or some file changes if you
> > restore a multi level backup.
>
> What flags does restore(8) not preserve?
The flags of the files not touched by the following restore run.
> But there still can be a problem. If you do "chflags -R",
> you will lose the flag on any file that doesn't get touched
> by the restore(8).
These.
> You could use find(1) to generate a list and then use the
> list to reset the flags after. But that is a kludge.
And you might preserve flags that shouldn't be preserved, since they
were not during the backup (restored after the find).
> An option on dump(8) to force rewriting on schg files (when
> securelevel(8) allows) is probably appropriate, but as
> discussed, when you start to consider directories, it becomes
> non-trivial to implement.
Yes.
> Unfortunately, this PR is coming up on its fifth birthday
> and I don't do FreeBSD work anymore. Feel free to submit
> patches against a more modern CURRENT and STABLE.
I noticed this problem today. And the (incomplete) patch in the PR
was (kind of) rejected by you.
I will try to find some time to look at this.
Nicolas
More information about the freebsd-bugs
mailing list