summaryrefslogtreecommitdiff
path: root/sbin/restore
AgeCommit message (Collapse)Author
2024-05-09ctime(3) and ctime_r(3) can fail when timestamps are way off.Florian Obser
Add missing error checks to all calls under sbin/ Input kettenis, millert OK millert
2024-01-09Delete support for FFS filesystems before the in-inode symlinkPhilip Guenther
optimization. As observed by ali_farzanrad(at)riseup.net, support for these was broken in the 5.5 release in early 2014 by the time_t changes. No one noticed before now, so clearly this isn't something we need to continue to support; rejecting in ffs_validate() is an improvement. Also: simplify DIRSIZ(), drop OLDDIRFMT and NEWDIRFMT, tests of fs_maxsymlinklen against zero, #ifdef tests of FS_44INODEFMT, and remove support for newfs -O0, last used in 2016. ok miod@
2023-03-08Delete obsolete /* ARGSUSED */ lint comments.Philip Guenther
ok miod@ millert@
2022-03-31man pages: add missing commas between subordinate and main clausesChristian Weisgerber
jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
2021-10-24For open/openat, if the flags parameter does not contain O_CREAT, theTheo de Raadt
3rd (variadic) mode_t parameter is irrelevant. Many developers in the past have passed mode_t (0, 044, 0644, or such), which might lead future people to copy this broken idiom, and perhaps even believe this parameter has some meaning or implication or application. Delete them all. This comes out of a conversation where tb@ noticed that a strange (but intentional) pledge behaviour is to always knock-out high-bits from mode_t on a number of system calls as a safety factor, and his bewilderment that this appeared to be happening against valid modes (at least visually), but no sorry, they are all irrelevant junk. They could all be 0xdeafbeef. ok millert
2021-01-21Rearrange variables in dump / restore to handle -fno-common.mortimer
Largely following the commit by mckusick in FreeBSD. ok naddy@
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2018-04-27Restore mode on symlinksPhilip Guenther
ok deraadt@
2017-01-21Nuke whitespace foolish enough to expose itself during the greatKenneth R Westerback
"warning:" rectification.
2016-12-26Put some variable declarations under appropriate #if/#endif protectionKenneth R Westerback
so gcc doesn't complain about defining but not using them. typo correction & ok jca@
2016-07-28after getenv, check for empty string too. ok millertTed Unangst
2016-06-07per trending style, add continue to emtpy loop bodies.Ted Unangst
ok mglocker
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
2015-12-10Remove NULL-checks before free(). ok tb@mmcc
2015-11-21add missing NAME entries; ok schwarzeJason McIntyre
2015-11-07Use linkat() instead of link() so that hardlinks of symlinks workPhilip Guenther
ok millert@
2015-08-25Switch from utimes() to utimensat() to $estore full nanosecond granularityPhilip Guenther
ok millert@ deraadt@
2015-01-20Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orTheo de Raadt
delete <sys/param.h> if now possible ok guenther
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-11-26Prefer setvbuf() to setlinebuf() for portability; ok deraadt@Todd C. Miller
2014-09-07Reuse xtrfile() to avoid duplication.Philip Guenther
Casting from long to int for a size_t argument is dumb. Calling warnx() right before err() is silly. ok millert@
2014-09-03Mark msg() and panic() as printf-like and fix the format error it turns upPhilip Guenther
ok krw@
2014-07-21Switch from <sys/endian.h> or <machine/endian.h> to the new,Philip Guenther
being-standardized <endian.h> ok deraadt@ millert@ beck@
2014-07-20Make sure the correct errno is reported by warn* or err* and notPhilip Guenther
the errno of an intervening cleanup operation like close/unlink/etc. Diff from Doug Hogan (doug (at) acyclic.org)
2014-01-20Obvious .Xr fixes, found while testing mandocdb(8).Ingo Schwarze
2013-12-30Do not leak symtab fd (if at fd limit might even prevent correct operation)Theo de Raadt
from Loganaden Velvindron
2013-11-15Include unistd.h as it is the standard location for getopt().Todd C. Miller
2013-08-14no longer any need to quote macro lines with >9 args;Jason McIntyre
From: Jan Stary
2013-04-25big int_t/time_t fixes; ok deraadt@ krw@Otto Moerbeek
2013-04-24pretty print bigger off_tTheo de Raadt
ok tedu otto
2013-03-31typo fix from rodent@netbsd;Jason McIntyre
ok otto
2013-03-05add a few words to the -r description to avoid ambiguity;Jason McIntyre
issue noted by Ronald F. Guilmette, freebsd docs/176648
2013-01-17remove a uesless Pp;Jason McIntyre
2012-07-14replace (somewhat) magic numbers with constantsAlexander Hall
ok krw@
2011-12-23some spelling fixes, found using freebsd's "igor" document verifier;Jason McIntyre
2011-06-27remove some useless casts. ok krwTed Unangst
2010-07-20opration -> operationMiod Vallat
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2008-09-03Start with a max size tape buffer rather than one 1/2 the max (i.e.Kenneth R Westerback
32K). This allows the automatic recognition of dumps written with 64K buffers. It also prevents alert scsi devices from complaining about read requests that provide only 1/2 the room needed for an actual tape record. Problem noted, fix tested & ok henning@
2007-09-25remove unneeded feofCharles Longeau
with help and ok ray@
2007-09-25check fgets return valueCharles Longeau
use sizeof input intead of BUFSIZ remove unneeded feof handle empty strings returned by fgets properly remove newline and white space at the end of buffer with help and ok ray@
2007-09-13use strcspn to properly overwrite '\n' in fgets returned bufferCharles Longeau
use strtonum instead of atoi prompted by ray@ ok moritz@ ray@
2007-09-07check fgets return valueCharles Longeau
use sizeof buf instead of TP_BSIZE use strcspn to properly overwrite '\n' in fgets returned buffer ok moritz@ ray@
2007-09-02use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsgTheo de Raadt
2007-06-03Add ffs2 support to dump/restore. From FreeBSD with some NetBSD changes.Todd C. Miller
With help from otto@
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-13g/c unused varsTodd C. Miller
2007-05-01for the restore -r example:Jason McIntyre
- use /dev/sd rather than /dev/rp, since rp no longer exists - use rst0 instead of rst8, since rst8 does not exist (by default) from Matthias Scheler ok otto
2007-02-25reword some text to avoid a hideous Xr;Jason McIntyre
2007-02-25one application does not need five synopses;Jason McIntyre