History log of /freebsd-10.0-release/sbin/restore/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


241848 22-Oct-2012 eadler

Check the return error of set[e][ug]id. While this can never fail in the
current version of FreeBSD, this isn't guarenteed by the API.
Custom security modules, or future implementations of the setuid and
setgid may fail.

Submitted by: Erik Cederstrand
Approved by: cperciva
MFC after: 3 days


241013 27-Sep-2012 mdf

Fix sbin/ build with a 64-bit ino_t.

Original code by: Gleb Kurtsou


236213 29-May-2012 kevlo

Make sure that each va_start has one and only one matching va_end,
especially in error cases.


235837 23-May-2012 joel

mdoc: move two sentences from synopsis to description (where they really
belong). With this change, mandoc now formats these manpages properly.


214132 21-Oct-2010 uqs

mdoc: make pages render with mandoc

It's a bit more pedantic regarding .Bl list elements. This has an added
benefit of unbreaking the ipfw(8) manpage, where groff was silently
skipping one list element.


207998 12-May-2010 brueffer

Fix grammar in a line of output.

PR: 145343
Submitted by: Hywel Mallett <hywel@hmallett.co.uk>
MFC after: 1 week


204111 20-Feb-2010 uqs

Fix common misspelling of hierarchy

Pointed out by: bf1783 at gmail
Approved by: np (cxgb), kientzle (tar, etc.), philip (mentor)


203816 13-Feb-2010 jh

Don't try to determine tape block size when the -P option is used.
This was missed in r203157.

PR: bin/121502


203157 29-Jan-2010 jh

- Handle short reads when the -P option is used. Short reads must be
handled when reading from pipes.
- Remove dead code related to the -P option from getvol(). pipein and
pipecmdin are never set at the same time.

PR: bin/121502
Approved by: trasz (mentor)
MFC after: 2 weeks


203155 29-Jan-2010 jh

- Cast time_t, int64_t and some int32_t values to intmax_t and use "%jd"
in format strings.
- Use (void) instead of (void *) when discarding strcat(3) return value.
- Format string fixes to match variable types.
- Change canon() len parameter and getcmd() size parameter type from
int to size_t.
- Style Makefile and increase WARNS to 2.

PR: bin/140061
Submitted by: uqs
Approved by: trasz (mentor)


192586 22-May-2009 trasz

Make 'struct acl' larger, as required to support NFSv4 ACLs. Provide
compatibility interfaces in both kernel and libc.

Reviewed by: rwatson


187828 28-Jan-2009 imp

Restore necessary NUL termination of locname.

Submitted by: ian dowse
MFC after: 2 days


179255 23-May-2008 mckusick

Fix nits pointed out in PR bin/39905 that have not already been
corrected since it was filed. With this change the PR will be closed.

PR: bin/39905


179219 22-May-2008 mckusick

This fixes the "getfile: lost data" panic when restoring dumps
on a 7.0 or later system that were created on a pre-5.0 system.
We must ensure that restore zeros out the previously undefined
birthtime and external attribute size fields when reading dump
tapes made by the UFS1 dump program.

The problem is that UFS2 dump carefully zeros out the unused
birthtime and external attribute size fields in the dump header
when dumping UFS1 filesystems, but the UFS1 dump didn't know about
those fields (they were spares) so just left whatever random junk
was in them. So, when restoring one of these pre-UFS2 dumps,
the new restore would eventually trip across a header that had
a non-zero external attribute size and try to extract it. That
consumed several tape blocks which left it totally out of sync
and very unhappy (i.e., the panic). The fix is in the gethead()
function which modernizes old headers by copying old fields to
their new location (and with this fix) zeroing out previously
undefined fields.

PR: bin/120881
Review by: David Malone & Scott Lambert
MFC after: 1 week


179218 22-May-2008 mckusick

Follow on to fix 1.51 for "Header with wrong dumpdate" message.

Must ensure that dump tapes from UFS1 filesystems properly copy
old fields of dump headers to new locations. Move check of dumpdate
to follow the code which ensures that the appropriate fields have
been copied.

PR: bin/118087
Help from: David Malone, Scott Lambert, Javier Martín Rueda
MFC after: 2 weeks


178205 14-Apr-2008 mckusick

restore(8) does not check for write failure while building two temp
files containing directory and ownership data. If /tmp fills, the
console is blasted with zillions of "file system full" errors, and
restore continues on, even though directory and/or ownership data
has been lost. This is particularly likely to happen when running
from the live CD, which has little /tmp space.

PR: bin/93603, also probably bin/107213
Fix from: Ken Lalonde


178126 11-Apr-2008 mckusick

Avoid printing spurious ``Header with wrong dumpdate.'' message.


178125 11-Apr-2008 mckusick

Correctly set file group when restore is run by a user other than root.


177894 03-Apr-2008 imp

Use safer string handling.

Reviewed by: security-team


167259 06-Mar-2007 mckusick

Move macros describing extended attributes in UFS from
<sys/extattr.h> to <ufs/ufs/extattr.h>. Move description
of extended attributes in UFS from man9/extattr.9 to
man5/fs.5.

Note that restore will not compile until <sys/extattr.h>
and <ufs/ufs/extattr.h> have been updated.

Suggested by: Robert Watson


167011 26-Feb-2007 mckusick

Update the dump program to save extended attributes. Update
the restore program to restore all dumped extended attributes.

If the restore is running as root, it will always be able
to restore all extended attributes. If it is not running
as root, it makes a best effort to set them. Using the -v
command line flag or the `verbose' command in interactive
mode will display all the extended attributes being set on
files (and at the end on directories) that are being restored.
It will note any extended attributes that could not be set.

The extended attributes are placed on the dump image immediately
following each file's data. Older versions of restore can work
with the newer dump images. Old versions of restore will
correctly restore the file data and then (silently) skip
over the extended attribute data and proceed to the next file.

This resolves PR 93085 which will be closed once the code
has been MFC'ed.

Note that this code will not compile until these header
files have been updated: <protocols/dumprestore.h> and
<sys/extattr.h>.

PR: bin/93085
Comments from: Poul-Henning Kamp and Robert Watson
MFC after: 3 weeks


164911 05-Dec-2006 dwmalone

Add a "-D" flag to restore which puts it into "degraded" mode. This
makes restore less efficient, but it makes a bigger effore to read
corrupted dumps. Specifiacally, when in degreded mode:

1) Restore shifts the input by 1 byte if it sees a problem,
rather than one tape block.
2) It doesn't assume the inodes are stored in ascending order.
3) It turns some panics into warning printfs.

We also verify some fields more carefully than before.

There's probably more a degreded mode could do, but this seems to
help a lot.

Approved by: imp, iedowse, mckusick
MFC after: 3 weeks


163272 12-Oct-2006 ru

Mention the -L option of dump(8) that can neutralize negative
effects of restoring dumps of live file systems.

PR: docs/91297


161605 25-Aug-2006 maxim

o Fix style(9) for previous.


161598 25-Aug-2006 maxim

A bunch of fixes from NetBSD:

o Restore owner/group/mode/atime/mtime of symbolic links, rev. 1.30.
o Extract file flags of symbolic link, rev. 1.42.
o Call getfile() before altering file attributes.
Open file with mode 0600 instead of 0666 so that file won't remain
group or world readable/writable even if getfile() terminated.
Move skipfile() before altering file attributes in IF{CHR,BLK} and
IFIFO case for symmetry, rev. 1.32.
o Use file mode 0600 when creating special file or fifo, revs. 1.33, 1.34.

o Remove redundant -N check.

PR: bin/101660
Submitted by: Andrey V. Elsukov
Obtained from: NetBSD, enami@netbsd
MFC after: 6 weeks


151509 20-Oct-2005 dds

Remove a diagnostic message that can't occur: we lost the ability to
handle the old filesystem format on 2002/06/21.


148244 21-Jul-2005 dds

Interpret correctly the glob(3) return value.
Previously, interactive commands specifying a non-existent file or
directory used to display an "out of memory error".

MFC after: 2 weeks


146754 29-May-2005 charnier

rscid -> __FBSDID. Mark parameter as __unused when necessary.


144597 03-Apr-2005 imp

Remove debug from last commit


144564 03-Apr-2005 imp

/*-


144117 25-Mar-2005 imp

Revert bogus += -g change. I needed it to debug the problem.

Noticed by: njl, Andrej Tobola


144099 25-Mar-2005 imp

Restore the ability to read FreeBSD 1 tapes (and I think any net2
based tapes, but I'm not sure where NFS_MAGIC was introduced after
4.3). When support for the pre-4.4 format was removed (the ability to
read 4.2 and 4.3 BSD tapes), the old format inode conversion was
junked as well. However, FreeBSD 1 dump tapes use the NFS_MAGIC
format, but have this inode format. Before, restore would fail
complaining that '.' wasn't found and the root directory wasn't on
this tape. Since the conversion from the not so old format is
relatively trivial, restore the code to make that conversion.

FreeBSD 1 dumps are once again readable.

MFC After: a few days


144097 25-Mar-2005 imp

dcvt is unused since the support for converting pre-4.4 tapes was
removed. Go ahead and remove it and struct odirent since it too is
unused.

# FreeBSD 1.1.5 tapes are still unreadable, but 2.0 and newer work.


144093 25-Mar-2005 imp

c_tapea and c_firstrec are used for TS_TAPE blocks, so convert them
for the old (4.4-lite through FreeBSD 4.x and *BSD) format. It looks
like they aren't used for TS_INODE, but conversion costs so little
there that I've not removed them there (in case my grep was wrong).

This makes at least some of the tapes work for me again. Now, to
regresion test all my dusty tapes...


143819 18-Mar-2005 imp

In order to print out the dump dates correctly, the date and ddate fields
also need to be convereted for old tapes for records of type TAPE.


143817 18-Mar-2005 imp

Sync usage and man page with reality. There's no '-c' command line
flag today. Maybe we should still retain it, but I'll let others fight
that windmill.


141846 13-Feb-2005 ru

Expand *n't contractions.


141611 10-Feb-2005 ru

Sync program's usage() with manpage's SYNOPSIS.


140415 18-Jan-2005 ru

Sort sections.


131488 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


129666 24-May-2004 stefanf

Use the correct types for the functions rst_opendir(), glob_readdir() and
rst_closedir() which are called by glob().

Reviewed by: md5
Approved by: das (mentor)


129665 24-May-2004 stefanf

Include <timeconv.h> for time conversion functions.

Approved by: das (mentor)


129327 17-May-2004 ru

Assorted markup, grammar, and spelling fixes.


128175 13-Apr-2004 green

Add -P arguments for dump(8) and restore(8) which allow the user to
use backup methods other than files and tapes. The -P argument is
a normal sh(1) pipeline with either $DUMP_VOLUME or $RESTORE_VOLUME
defined in the environment, respectively.

For example, I can back up my home to three DVD+R[W]s as so:
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad0s2e 40028550 10093140 26733126 27% /home
green# dump -0 -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /home


128073 09-Apr-2004 markm

Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp


126178 23-Feb-2004 johan

style.Makefile(5):
Use WARNS?= instead of WARNS=.


121541 26-Oct-2003 peter

Fix gcc warnings. If NAME_MAX is 255, and d_namlen is a uint8_t, then
d_namlen can never be > NAME_MAX. Stop gcc worrying about this by
using a preprocessor test to see if NAME_MAX changes.


118526 06-Aug-2003 ache

Localize 'ls' output
Don't set 8bit in quote processing


116035 08-Jun-2003 charnier

Add section number to .Xr


114463 01-May-2003 ru

Removed all vestiges of KerberosIV.


114460 01-May-2003 ru

Style.


114452 01-May-2003 markm

De-Kerberise (KerberosIV). KerberosIV is no longer present, and
remote backups can still be done with Kerberos authentication using
SSH and Kerberos 5.


109066 10-Jan-2003 sheldonh

Add TAPE to the ENVIRONMENT section.

MFC after: 1 month


109065 10-Jan-2003 sheldonh

Add an ENVIRONMENT section so that the reader knows that the TMPDIR envar
is honoured.

Reported by: des
MFC after: 1 month


108221 23-Dec-2002 ru

Fixed the abuses of .Ql visible on stderr in troff mode.

PR: docs/37176


103949 25-Sep-2002 mike

Use the standardized CHAR_BIT constant instead of NBBY in userland.


102411 25-Aug-2002 charnier

Replace various spelling with FALLTHROUGH which is lint()able


102232 21-Aug-2002 imp

Use '0' instead of NULL when we mean the integer constant 0 and not a
"null pointer expression".


102231 21-Aug-2002 trhodes

s/filesystem/file system/g as discussed on -developers


100207 17-Jul-2002 mckusick

Change utimes to set the file creation time (for filesystems that
support creation times such as UFS2) to the value of the
modification time if the value of the modification time is older
than the current creation time. See utimes(2) for further details.

Sponsored by: DARPA & NAI Labs.


99503 06-Jul-2002 charnier

The .Nm utility.


98542 21-Jun-2002 mckusick

This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.

Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.

Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).

Sponsored by: DARPA & NAI Labs.
Reviewed by: Poul-Henning Kamp <phk@freebsd.org>


96707 16-May-2002 trhodes

more file system > filesystem


96113 06-May-2002 iedowse

Address a few minor style and consistency issues in revision 1.32.

Submitted by: Joshua Goodall <joshua@roughtrade.net>


95943 02-May-2002 iedowse

Set the permissions on restored symbolic links.

PR: bin/37665
Submitted by: "Michael C. Adler" <mad1@tapil.com>


94985 18-Apr-2002 ru

Replaced exists() tests with two equivalent defined().

LIBDIR is defined in bsd.own.mk but sys.mk no longer
includes bsd.own.mk as of revision 1.60.


94531 12-Apr-2002 trhodes

restore(8) manual page does not explain rrestore.

PR: 34234
Submitted by: Gary W. Swearingen <swear@blarg.net>


92837 20-Mar-2002 imp

o remove __P
o Use ANSI function definitions
o unifdef -D__STDC__


92806 20-Mar-2002 obrien

Remove 'register' keyword.
It does not help modern compilers, and some may take some hit from it.
(I also found several functions that listed *every* of its 10 local vars with
"register" -- just how many free registers do people think machines have?)


90827 18-Feb-2002 iedowse

Use a more robust scheme for determining how many blocks to skip
after an EOT-terminated volume. We keep track of the current record
number, and synchronise it with the c_tapea field each time we read
a header. Avoid the use of c_firstrec because some bugs in dump can
cause it to be set incorrectly.

Move the initialisation of some variables to avoid compiler warnings.


90820 18-Feb-2002 iedowse

When we reach the end of the dump in findinode(), ask for another
volume if we missed some earlier tapes (the user can still enter
'none' later if the tapes are unavailable). Previously with 'x'
restores, we might not ask for all tapes if the tapes are supplied
in reverse order.

Clarify the message that describes what volume should be mounted
first; reverse order is only efficient when extracting a few files.


90642 14-Feb-2002 iedowse

In createfiles(), properly handle a number of cases where no further
volumes are available, instead of getting stuck in a loop calling
getvol(). Normally restore in 'x' or 'i' modes will ask for a new
(earlier) volume when the current inode number on the tape is greater
than the last inode to be restored, since there can be no further
inodes of interest on that volume. However we don't want to change
volumes in this case either if the user explicitly said that there
are no more tapes, or if we are looking at the first volume.

When no more volumes are available but there are still inodes that
we have not found, we now just fall through to the code that prints
out a list of any missing files, so the restore completes normally.
Also simplify the logic a bit by always returning to the start of
the main for(;;) loop whenever the volume has changed.

This should completely fix the "Changing volumes on pipe input" bug
that is often observed when restoring dumps of active filesystems.

PR: bin/4176, bin/34604, misc/34675


90608 13-Feb-2002 iedowse

Fix a number of long-standing restore bugs in tape.c, mainly relating
to multi-volume restores:
- In findinode(), keep a copy of header->c_type so that we don't
exit the do-while loop until we have processed the current header.
Exiting too early leaves curfile.ino set to 0, which confuses
the logic in createfiles(), so multi-volume restores with the
'x' command don't work if you follow the instructions and supply
the tapes in reverse order. This appears to have been broken
by CSRG revision 5.33 tape.c (Oct 1992).
- The logic in getvol() for deciding how many records to skip after
the volume header was confused; sometimes it would skip too few
records and sometimes too many, leading to "resync restore"
warnings and missing files. Skip to the next header only when
the current action is not `USING'. Work around a dump bug that
sets c_count incorrectly in the volume header of the first tape.
Some of the problems here date back to at least 1991.
- Back out revision 1.23. This appeared to avoid warnings about
missing files in the 'rN' verification case, but it made the
problems with the 'x' command worse by stopping getvol() from
even attempting to find the first inode number on the newly
inserted tape. The bug it addressed is fixed by correcting the
skipping logic as described above.
- Save the value of `tpblksread' in case the wrong volume is
supplied, because it is incremented each time we read a volume
header. We already saved `blksread' for the same reson.


90573 12-Feb-2002 iedowse

Don't refer to findinode()'s `complain' parameter in a comment; it
was removed in 1986.


89572 19-Jan-2002 dillon

I've been meaning to do this for a while. Add an underscore to the
time_to_xxx() and xxx_to_time() functions. e.g. _time_to_xxx()
instead of time_to_xxx(), to make it more obvious that these are
stopgap functions & placemarkers and not meant to create a defacto
standard. They will eventually be replaced when a real standard
comes out of committee.


87325 04-Dec-2001 obrien

Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by: mike


85746 30-Oct-2001 tobez

Fix a bug where restore(8) segfaults while trying to restore on a
read-only FS.

Reviewed by: audit silence
Approved by: markm
MFC after: 2 weeks


85635 28-Oct-2001 dillon

Make the protocol/dumprestore.h header match restore's idea of the dump
header for the case where sizeof(time_t) != sizeof(int). dumprestore.h
was embedding time_t when it should have been embedding int32_t.

Use time_to_time32() and time32_to_time() to convert between the
protocoll/file-format time and time_t.


84352 02-Oct-2001 cjc

Documentation fixes:

- The '-d' option was not documented on the manpage or in the
usage message.

- The '-N' option was not included in the usage.


82556 30-Aug-2001 ru

restore(8) doesn't need to be setgid `tty', and never did.

At the times, restore(8) and rrestore(8) were the different
utilities. rrestore(8) was installed setuid `root', while
restore(8) with usual ownership and privileges. Later on,
on August 28, 1991 (what a coincidence!), rrestore(8) code
was merged with restore(8). The setgid `tty' bit then was
accidentally put.


81941 20-Aug-2001 dd

Fix grammar.


81940 20-Aug-2001 dd

Respect the -N flag when changing directory attributes in setdirmode).

PR: 29671
Submitted by: Sascha Blank <sblank@addcom.de>


81911 19-Aug-2001 kris

Silence non-constant format string warnings by marking functions
as __printflike()/__printf0like(), adding const, or adding missing "%s"
format strings, as appropriate.

MFC after: 2 weeks


81579 13-Aug-2001 sobomax

Honour `TMPDIR' environment variable.

Reviewed by: ru
Approved by: ru
MFC after: 2 weeks


79754 15-Jul-2001 dd

Remove whitespace at EOL.


79530 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


78732 24-Jun-2001 dd

Include missing header files which define functions for which gcc has
builtins (e.g., exit, strcmp).


78486 20-Jun-2001 mikeh

Document the interactive command `what'.

Reviewed by: ru
MFC after: 2 weeks


78039 11-Jun-2001 mjacob

Add 'SKIP' as an action so that verification works for multivolume restores.
Tested with filesystem files.

PR: 27218
Submitted by: mad1@tapil.com
MFC after: 3 weeks


74815 26-Mar-2001 ru

- Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.


74531 20-Mar-2001 ru

Set the default manual section for sbin/ to 8.


74027 09-Mar-2001 obrien

bye-bye documented raw device


73986 08-Mar-2001 obrien

Move _PATH_DEFTAPE to <paths.h> to remove all the duplication of definitons,
and remove leading `r'(aw) from it.


72432 13-Feb-2001 ru

mdoc(7) police: use the default ``file ...'' feature of the .Ar macro.


71099 16-Jan-2001 ru

Prepare for mdoc(7)NG.


70152 18-Dec-2000 ru

Prepare for mdoc(7)NG.


69906 12-Dec-2000 iedowse

Stop restore from looping under certain error conditions. This
corrects cases where restore would spew an infinite stream of
"Changing volumes on pipe input?" messages, or would loop waiting
for a response to the "set owner/mode for '.'" question.

PR: bin/14250
Reviewed by: dwmalone


69895 12-Dec-2000 mckusick

Don't give up on file write errors. Just log them and continue.


68960 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


68575 10-Nov-2000 ru

Avoid use of direct troff requests in mdoc(7) manual pages.


66907 10-Oct-2000 wollman

Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and thereby
<time.h>).


65786 12-Sep-2000 mjacob

Fix sign extension.

PR: 21232
Obtained from: Christian Weisgerber <naddy@mips.inka.de>


64535 11-Aug-2000 sheldonh

Add text from NetBSD's rev 1.12 which should have accompanied
the changes made to our own source on 1997-01-01.

PR: 20445
Submitted by: Jon Masami Kuroda <jkuroda@eecs.berkeley.edu>


63283 16-Jul-2000 dwmalone

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>


60128 07-May-2000 kris

Update references to disk and tape devices.


57668 01-Mar-2000 sheldonh

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


57660 01-Mar-2000 nik

Remove xrefs to obsolete ft driver.

PR: docs/17080
Submitted by: Udo Erdelhoff <ue@nathan.ruhr.de>


57449 24-Feb-2000 markm

Use libcrypto instead of libdes.


57268 17-Feb-2000 unfurl

Committed changes to restore(8) for previously undocumented -N option.

PR: 15600
Reviewed by: jim


55768 10-Jan-2000 phantom

Add `.Nm rrestore' to NAME section.


51444 20-Sep-1999 markm

Prepare for K5.


51435 19-Sep-1999 markm

Fix for new KerberosFix for new Kerberos44


50476 28-Aug-1999 peter

$Id$ -> $FreeBSD$


41845 16-Dec-1998 imp

Fix two possible non-exploitable buffer overflows.

Thanks to: A friend at Sun auditing dump/restore for Solaris.


41383 28-Nov-1998 rnordier

Refer to "da" rather than "sd" device.


40668 27-Oct-1998 dima

64bit fixes.
(Note: ``dump'' doesn't work on alpha yet. Apparently there's a problem
somewhere is the physio() area)

Submitted by: myself && Matt Dillon.


39559 22-Sep-1998 roberto

Change rst0 into rsa0.


39495 19-Sep-1998 obrien

Remove useless `BINOWN=root' now that it is the default.


39430 17-Sep-1998 imp

Prevent buffer overflow with extra long arguments.


38149 06-Aug-1998 markm

Fix LIBDIR (for aout/ELF).


37923 28-Jul-1998 imp

Commit patch from Tor Egge to fix the "large filesystem restore" problem.
This appears to work for me in the old case, but I don't have large
enough filesystems to test the fix case.

Reported working by: karl@mcs.net


37906 28-Jul-1998 charnier

Add rcsid. Remove unused #includes. Add missing prototypes and others -Wall
cleanings. Spelling.


37523 09-Jul-1998 jdp

Fix a bug that prevented the restoration of hard links to files that
had the schg flag set. Reported by Matthew Thyer <thyerm@camtech.net.au>.


37240 28-Jun-1998 bde

Fixed printf format errors. Sure is dusty here.


35852 09-May-1998 jkh

Well, nobody objected, so here's my -u (unlink) flag to restore.


34851 23-Mar-1998 jkh

The logic in tape.c:getfile() doesn't allow for a filesystem
with a blocksize smaller than the tape block size. The problem
seems to be most easily fixed by changeing where fssize is set.

PR: 5704
Submitted by: David Malone <dwmalone@maths.tcd.ie>


31925 21-Dec-1997 max

Typo fix in the message displayed.


30693 24-Oct-1997 markm

Make this part of the 'krb' distribution if it is being built as the
Kerberised version.


29920 28-Sep-1997 markm

Changes for the new KTH KerberosIV


29574 18-Sep-1997 phk

Many places in the code NULL is used in integer context, where
plain 0 should be used. This happens to work because we #define
NULL to 0, but is stylistically wrong and can cause problems
for people trying to port bits of code to other environments.

PR: 2752
Submitted by: Arne Henrik Juul <arnej@imf.unit.no>


28034 10-Aug-1997 joerg

If, in a level N dump, the file with the inode number X is a
non-directory file with more than one link to it, but in a level M > N
dump, the file with the inode number X is a plain file, "restore", when
restoring the level M dump, won't remove all the hard links to the old
file.

Submitted by: guy@netapp.com (Guy Harris)


26722 18-Jun-1997 charnier

Fprintf -> warn.


25289 29-Apr-1997 wollman

Document -k flag here, too.


25288 29-Apr-1997 wollman

Implement Kerberized rcmd for rdump/rrestore. This is lacking the
options one would normally expect to set the realm, enable encryption,
and whatnot, but this actually is able to contact the remote server,
so at least it's a start. (As a bonus, the stripped static binary is
unquestionably exportable.)


24359 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


23685 11-Mar-1997 peter

Merge from Lite2
- cleanups,
- whiteout support
- bug fixes (chflags missing on a few file types etc)
The dump/restore folks would want to have a closer look at this, the
change is pretty big.


23670 11-Mar-1997 peter

This commit was generated by cvs2svn to compensate for changes in r23669,
which included commits to RCS files with non-trunk default branches.


23096 25-Feb-1997 imp

Fix a minor problem with restore from tapes from big endian machines.
This finishes the closing of PR2446 which J"org Wunsch pointed out to
me after I closed it.

Submitted by: Tor Egge <Tor.Egge@idt.ntnu.no>


22990 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


22492 09-Feb-1997 eivind

Remove suid bit from binary, and update manpage to reflect this.


22482 09-Feb-1997 eivind

Buffer overflow patch.


21997 25-Jan-1997 imp

Apply patch from pr2536, after testing locally.

Fixes: PR2446 and PR2536

Submitted by: Flemming Jacobsen <fj@tfs.com>

2.2 Candidate.


21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


21635 13-Jan-1997 wosch

Sort cross references.


21174 01-Jan-1997 guido

Yet another buffer overflow.

2.2 candidate
(and -stable too actually, who does that?)
Reviewed by: Warner Losh


21149 01-Jan-1997 imp

Various security related deltas from OpenBSD

dirs.c:
From OpenBSD 1.2, 1.3, 1.5, 1.8, 1.10, 1.11, 1.12
1.2:
use unique temporary files; netbsd pr#2544;
lukem@supp.cpr.itg.telecom.com.au
1.3:
updated patch from lukem@supp.cpr.itg.telecom.com.au
to also make -r and -R work again
1.5:
mktemp open & fdopen
1.8:
/tmp// -> /tmp/
1.10:
Fix strncpy usage and correct strncat length field,
from Theo. Also change some occurrence of MAXPATHLEN
with sizeof(foo).
1.11:
does noone know how to use strncat correctly?
1.12:
use mkstemp()
From NetBSD:
Use open rather than create so we can specify
exclusive open mode.

main.c:
From OpenBSD 1.2, 1.5
1.2:
From NetBSD: support $TAPE.
1.5
Set umask to be read only by owner until we set real
file permissions.
tape.c:
From NetBSD:
Use open rather than create so we can specify
exclusive open mode.


18406 20-Sep-1996 nate

ts_sec -> tv_sec
ts_nsec -> tv_nsec


18286 14-Sep-1996 bde

Don't use __dead or __pure in user code. They were obfuscations
for gcc >= 2.5 and no-ops for gcc >= 2.6. Converted to use __dead2
or __pure2 where it wasn't already done, except in math.h where use
of __pure was mostly wrong.


17261 23-Jul-1996 jkh

When running 'rrestore foo', you get a segmentation fault because
the obsolete() function to convert dump-style args to getopt-style
args doesn't check to see that 'f' really has an argument following
the option string in argv[1].

Submitted-By: jmacd


13922 05-Feb-1996 mpp

Correct some man page cross references and some file
locations.


12489 26-Nov-1995 joerg

Make the default tape device match dump(8).


10515 01-Sep-1995 joerg

Check a pointer in skipdirs() before dereferencing it. I don't fully
understand why it can become a null pointer under some circumstances,
but i've got a pile of tapes where this happens, and running it thru a
debugger proved that simply ending the loop in this case did the right
thing.

Anyway, it cannot make it worse than now, where restore kills itself
with "Memory fault".


8871 30-May-1995 rgrimes

Remove trailing whitespace.


6305 10-Feb-1995 martin

Added FIFO restore capability.


5913 26-Jan-1995 jkh

Add a reference to ft(8).


5705 18-Jan-1995 joerg

Should that last sentence read "...thus a full dump must be done...",
or do I have it all wrong?

Submitted by: "Shawn M. Carey" <smcarey@mailbox.syr.edu>


2558 08-Sep-1994 pst

Fix endian bug introduced at Berkeley during the Net2->4.4-lite transition.
Fix is courtesy of the NetBSD folks.

Reviewed by: pst


1855 05-Aug-1994 wollman

Convert to our man installation style. Also fixed long-standing bug
in `fastboot'/`fasthalt' in which the interpreter would hang around
after `reboot' or `halt' is run, causing an irritating ``Killed'' message.


1609 28-May-1994 rgrimes

Remove old style manual page depends so make install with NOMAN set
can run.


1559 26-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1558,
which included commits to RCS files with non-trunk default branches.