| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally, count=n means read(2) will be called n times on the input to dd. If
the read() returns short, as may happen when reading from a pipe, fewer bytes
will be copied from the input. With conv=sync the buffer is padded with zeros
to fill the rest of the block.
iflag=fullblock causes dd to continue reading until the block is full, so that
count=n means n full blocks are copied. This flag is compatible with illumos
and GNU dd and is used in the ZFS test suite.
Submitted by: Ryan Moeller
Reviewed by: manpages, mmacy@
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D21441
Notes:
svn path=/head/; revision=352923
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sets the O_FSYNC flag on the output file. oflag=fsync and oflag=sync are
synonyms just as O_FSYNC and O_SYNC are synonyms. This functionality is
intended to improve portability of dd commands in the ZFS test suite.
Submitted by: Ryan Moeller
Reviewed by: manpages, mmacy@
MFC after: 1 week
Sponsored by: iXsytems, Inc.
Differential Revision: https://reviews.freebsd.org/D21422
Notes:
svn path=/head/; revision=352922
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
close(2) can return errors from previous operations which should not be ignored.
PR: 229616
Submitted by: Thomas Hurst
Reported by: Thomas Hurst
Reviewed by: mmacy@
Obtained from: Ryan Moeller
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D21376
Notes:
svn path=/head/; revision=352921
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fdatasync flag performs an fdatasync(2) on the output file before closing it.
This will be useful for the ZFS test suite.
Submitted by: Ryan Moeller
Reviewed by: manpages, mmacy@
MFC after: 1 week
Sponsored by: iXSystems, Inc.
Differential Revision: https://reviews.freebsd.org/D21373
Notes:
svn path=/head/; revision=352920
|
|
|
|
| |
Notes:
svn path=/head/; revision=352385
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The default package use to be FreeBSD-runtime but it should only contain
binaries and libs enough to boot to single user and repair the system, it
is also very handy to have a package that can be tranform to a small mfsroot.
So create a new package named FreeBSD-utilities and make it the default one.
Also move a few binaries and lib into this package when it make sense.
Reviewed by: bapt, gjb
Differential Revision: https://reviews.freebsd.org/D21506
Notes:
svn path=/head/; revision=351858
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fsync flag performs an fsync(2) on the output file before closing it.
This will be useful for the ZFS test suite.
Submitted by: ryan@ixsystems.com
Reviewed by: jilles@, imp@
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Notes:
svn path=/head/; revision=351770
|
|
|
|
|
|
|
|
|
| |
The RELEASE_CRUNCH check is redundant here. We don't need it for releases
anymore, and picobsd can control this more directly without making it a special
case.
Notes:
svn path=/head/; revision=349990
|
|
|
|
|
|
|
|
|
|
| |
This is somewhat of a follow-up to r335746.
MFC after: 2 weeks
Sponsored by: DellEMC
Notes:
svn path=/head/; revision=349062
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
asserted. Some development boards for example will reset on DTR,
and some radio interfaces will transmit on RTS.
This patch allows "stty -f /dev/ttyu9.init -rtsdtr" to prevent
RTS and DTR from being asserted on open(), allowing these devices
to be used without problems.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D20031
Notes:
svn path=/head/; revision=348999
|
|
|
|
|
|
|
|
|
|
| |
newvers.sh has supported a variable setting only mode, use that in
preference to grep to future proof this script from changes there.
Differential Revision: https://reviews.freebsd.org/D19849
Notes:
svn path=/head/; revision=348177
|
|
|
|
|
|
|
|
|
|
| |
Since D19668 was done, new users of the -n flag have surfaced. Parse
and ignore it on the command line until they can be updated.
Suggested by: rgrimes (in D19668).
Notes:
svn path=/head/; revision=346624
|
|
|
|
|
|
|
|
| |
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=345548
|
|
|
|
|
|
|
|
|
|
| |
r342139 bork setting the date. This fixes it by simply removing the -n
flag.
Differential Revision: https://reviews.freebsd.org/D19668
Notes:
svn path=/head/; revision=345365
|
|
|
|
|
|
|
|
|
| |
Remove -d and -t flags that were removed in r345050.
Noticed by: rgrimes@
Notes:
svn path=/head/; revision=345081
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These were used to set dst flag and minutes west of UTC
respectively. These are obsolete and have been removed form the
kernel. These existed primarily to faithfully emulate early
Unix ABIs that have been removed from FreeBSD.
Reviewed by: jbh@, brooks@
Differential Revision: https://reviews.freebsd.org/D19550
Notes:
svn path=/head/; revision=345050
|
|
|
|
|
|
|
|
|
| |
PR: 236407
Reported by: Brian Saia
MFC after: 1 week
Notes:
svn path=/head/; revision=344952
|
|
|
|
| |
Notes:
svn path=/head/; revision=344902
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The pipefail option allows checking the exit status of all commands in a
pipeline more easily, at a limited cost of complexity in sh itself. It works
similarly to the option in bash, ksh93 and mksh.
Like ksh93 and unlike bash and mksh, the state of the option is saved when a
pipeline is started. Therefore, even in the case of commands like
A | B &
a later change of the option does not change the exit status, the same way
(A | B) &
works.
Since SIGPIPE is not handled specially, more work in the script is required
for a proper exit status for pipelines containing commands such as head that
may terminate successfully without reading all input. This can be something
like
(
cmd1
r=$?
if [ "$r" -gt 128 ] && [ "$(kill -l "$r")" = PIPE ]; then
exit 0
else
exit "$r"
fi
) | head
PR: 224270
Relnotes: yes
Notes:
svn path=/head/; revision=344502
|
|
|
|
|
|
|
|
| |
PR: 233343
Submitted by: Yuichiro NAITO (original version)
Notes:
svn path=/head/; revision=344306
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SVN r342880 was designed to fix $((-9223372036854775808)) and things like
$((0x8000000000000000)) but also broke error detection for values of
variables without dollar sign ($((x))).
For compatibility, overflow in plain literals continues to be ignored and
the value is clamped to the boundary (except 9223372036854775808 which is
changed to -9223372036854775808).
Reviewed by: se (although he would like error checking to be removed)
MFC after: 2 weeks
X-MFC-with: r342880
Differential Revision: https://reviews.freebsd.org/D18926
Notes:
svn path=/head/; revision=343981
|
|
|
|
|
|
|
|
|
|
|
| |
The rest of this stuff is still to be discussed, but I think at this
point we have the agreement that the aliases should go.
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=343440
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: jilles
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D18872
Notes:
svn path=/head/; revision=343416
|
|
|
|
|
|
|
|
|
|
|
|
| |
shell startup.
Reviewed by: 0mp (man page), jilles
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D18790
Notes:
svn path=/head/; revision=343399
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
there's no need to even mention it in shell rc files. Not that it's wrong;
just pointless and somewhat misleading.
Reviewed by: jilles
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D18809
Notes:
svn path=/head/; revision=343231
|
|
|
|
|
|
|
|
|
|
| |
The libedit "fout" output must be sent to fd 2 since it contains prompts
that POSIX says must be sent to fd 2. However, the libedit "ferr" output
receives error messages such as from "bind" that make no sense to send to fd
1.
Notes:
svn path=/head/; revision=343215
|
|
|
|
|
|
|
|
|
|
|
| |
results between an expression that refers to a variable by name and the
same expression that includes the same variable by value.
Submitted by: se@
MFC after: 1 week
Notes:
svn path=/head/; revision=342880
|
|
|
|
|
|
|
| |
PR: 233545
Notes:
svn path=/head/; revision=342741
|
|
|
|
|
|
|
|
|
| |
PR: 233545
Submitted by: Jan Beich
Obtained from: NetBSD
Notes:
svn path=/head/; revision=342740
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if -z option also used.
Recommend the use of zip(1) if compressed files of predictable size needed.
PR: docs/41089
Submitted by: Sevan Janiyan
Reported by: areilly@bigpond.net.au
While here, pet igor
Reviewed by: bcr
Differential Revision: https://reviews.freebsd.org/D18686
Notes:
svn path=/head/; revision=342601
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: jilles
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D18663
Notes:
svn path=/head/; revision=342577
|
|
|
|
|
|
|
|
|
|
| |
Submitted by: Kyle Spiers ksspiers at gmail
Reviewed by: bcr,brooks,bz,sbruno
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D18505
Notes:
svn path=/head/; revision=342139
|
|
|
|
|
|
|
|
|
| |
Altering the -c string at run time does not make sense and is not possible.
MFC after: 1 week
Notes:
svn path=/head/; revision=341725
|
|
|
|
|
|
|
|
|
|
| |
Move cross ref to right place while here.
Submitted by: kib
MFC after: 7 days
Notes:
svn path=/head/; revision=341440
|
|
|
|
|
|
|
|
| |
Obtained from: NetBSD
MFC after: 7 days
Notes:
svn path=/head/; revision=341435
|
|
|
|
|
|
|
|
|
| |
PR: 231060
Submitted by: naddy
MFC after: 3 days
Notes:
svn path=/head/; revision=341357
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
with macro based around memcmp(). The latter is expected to be some
8 times faster on a modern 64-bit architectures.
In practice, throughput of doing conv=sparse from /dev/zero to /dev/null
went up some 5-fold here from 1.9GB/sec to 9.7GB/sec with this change
(bs=128k).
MFC after: 2 weeks
Notes:
svn path=/head/; revision=341257
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If word in ${param?word} is missing, the shell shall write a default error
message. So expanding ${param?} when param is not set should write an error
message like
sh: param: parameter not set
This was broken by r316417.
PR: 233585
Notes:
svn path=/head/; revision=341164
|
|
|
|
|
|
|
|
|
|
| |
This affects scripts named on the command line, named with a '.' special
builtin and found via the PATH %func autoloading mechanism.
PR: 231986
Notes:
svn path=/head/; revision=341097
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-P was introduced in 4.4BSD-Lite2 around 1994. It overwrote file contents
with a pass of 0xff, 0x00, then 0xff, in a low effort attempt to "really
delete" files.
It has no user-visible effect; at the end of the day, the file is unlinked via
the filesystem. Furthermore, the utility of overwriting files with patterned
data is extremely limited due to caveats at every layer of the stack[0] and
therefore mostly futile. At the least, three passes is likely wasteful on
modern hardware[1]. It could also be seen as a violation of the "Unix
Philosophy" to do one thing per tiny, composable program.
Since 1994, FreeBSD has left it alone; OpenBSD replaced it with a single
pass of arc4random(3) output in 2012[2]; and NetBSD implemented partial, but
explicitly incomplete support for U.S. DoD 5220.22-M, "National Industrial
Security Program Operating Manual" in 2004[3].
NetBSD's enhanced comment above rm_overwrite makes a strong case for removing
the flag entirely:
> This is an expensive way to keep people from recovering files from your
> non-snapshotted FFS filesystems using fsdb(8). Really. No more.
>
> It is impossible to actually conform to the exact procedure given in
> [NISPOM] if one is overwriting a file, not an entire disk, because the
> procedure requires examination and comparison of the disk's defect lists.
> Any program that claims to securely erase *files* while conforming to the
> standard, then, is not correct.
>
> Furthermore, the presence of track caches, disk and controller write
> caches, and so forth make it extremely difficult to ensure that data have
> actually been written to the disk, particularly when one tries to repeatedly
> overwrite the same sectors in quick succession. We call fsync(), but
> controllers with nonvolatile cache, as well as IDE disks that just plain lie
> about the stable storage of data, will defeat this.
>
> [NISPOM] requires physical media destruction, rather than any technique of
> the sort attempted here, for secret data.
As a first step towards evental removal, make it a placebo. It's not like
it was serving any security function. It is not defined in or mentioned by
POSIX.
If you are security conscious and need to erase your files, use a
woodchipper. At a minimum, the entire disk needs to be overwritten, not
just one file.
[0]: https://www.ru.nl/publish/pages/909282/draft-paper.pdf
[1]: https://commons.erau.edu/cgi/viewcontent.cgi?article=1131&context=jdfsl
[2]: https://github.com/openbsd/src/commit/7c5c57ba81b5fe8ff2d4899ff643af18c
[3]: https://github.com/NetBSD/src/commit/fdf0a7a25e59af958fca1e2159921562cd
Reviewed by: markj, Daniel O'Connor <darius AT dons.net.au> (previous version)
Differential Revision: https://reviews.freebsd.org/D17906
Notes:
svn path=/head/; revision=340330
|
|
|
|
|
|
|
|
|
|
|
| |
The difference between EXERROR and EXEXEC was that EXEXEC passed along
exitstatus and EXERROR set exitstatus to 2 in the handling code.
By changing the places that raised EXERROR to set exitstatus to 2, the
handling of EXERROR and EXEXEC becomes the same.
Notes:
svn path=/head/; revision=340284
|
|
|
|
|
|
|
| |
Use caph_{rights,ioctls,fcntls}_limit to simplify the code.
Notes:
svn path=/head/; revision=340138
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
You should not be using DES. You should not have been using DES for the
past 30 years.
The ed DES-CBC scheme lacked several desirable properties of a sealed
document system, even ignoring DES itself. In particular, it did not
provide the "integrity" cryptographic property (detection of tampering), and
it treated ASCII passwords as 64-bit keys (instead of using a KDF like
scrypt or PBKDF2).
Some general approaches ed(1) users might consider to replace the removed
DES mode:
1. Full disk encryption with something like AES-XTS. This is easy to
conceptualize, design, and implement, and it provides confidentiality for
data at rest. Like CBC, it lacks tampering protection. Examples include
GELI, LUKS, FileVault2.
2. Encrypted overlay ("stackable") filesystems (EncFS, PEFS?, CryptoFS,
others).
3. Native encryption at the filesystem layer. Ext4/F2FS, ZFS, APFS, and
NTFS all have some flavor of this.
4. Storing your files unencrypted. It's not like DES was doing you much
good.
If you have DES-CBC scrambled files produced by ed(1) prior to this change,
you may decrypt them with:
openssl des-cbc -d -iv 0 -K <key in hex> -in <inputfile> -out <plaintext>
Reviewed by: allanjude, bapt, emaste
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D17829
Notes:
svn path=/head/; revision=340132
|
|
|
|
|
|
|
|
| |
CID: 1375584
MFC after: 2 weeks
Notes:
svn path=/head/; revision=340014
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Use Xr to reference other manual pages.
- Reference execve(2) instead of exec(2) as exec(2) does not exist.
- Remove the deprecated "Tn" macro.
- Improve the formatting of the etime description.
Reviewed by: bcr
Approved by: krion (mentor, implicit), mat (mentor, implicit)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D17780
Notes:
svn path=/head/; revision=339962
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: bcr, eadler
Approved by: krion (mentor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D17146
Notes:
svn path=/head/; revision=339957
|
|
|
|
|
|
|
| |
No functional change is intended.
Notes:
svn path=/head/; revision=339822
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They only make sense in the context of directory ACLs, and attempting
to set them on regular files results in errors, causing a recursive
setfacl invocation to abort.
This is derived from patches by Shawn Webb <shawn.webb@hardenedbsd.org>
and Mitchell Horne <mhorne063@gmail.com>.
PR: 155163
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D15061
Notes:
svn path=/head/; revision=339793
|
|
|
|
|
|
|
|
|
|
|
| |
The subsequent acl_get_file(3) call will simply echo the same error.
PR: 229930
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=339781
|
|
|
|
|
|
|
|
|
| |
CID: 1390906
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=339780
|