In numeric mode, the default route is printed as "default" rather
than 0.0.0.0/0 or ::/0
From the man page:
"-n: Show network addresses and ports as numbers.
Normally netstat attempts to resolve addresses and ports, and display
them symbolically. If the -n option is specified, the address is
printed numerically, according to the address family.
For more information regarding the Internet IPv4 ``dot format'', refer
to inet(3). Unspecified, or `wildcard'', addresses and ports appear
as `*''."
Reported By: rgrimes
Reviewed by: emaste, ngie, eadler, seanc
Relnotes: yes
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D10320
In 2020, an improved implementation of the bc and dc commands
developed by Gavin D. Howard has been imported into FreeBSD.
It has replaced the OpenBSD-derived versions of these commands
in all currently supported FreeBSD releases.
The OpenBSD versions could still be built using the WITHOUT_GH_BC
option. There have been no reports of problems or unexpected
deviations from the OpenBSD version for some time, therefore
keeping the OpenBSD version is no longer required in FreeBSD.
This commit removes the option to build the OpenBSD version and
corresponding source files from -CURRENT. No MFC is planned, all
currently released FreeBSD versions should retain the build option.
The WITHOUT_GH_BC option is no longer accepted and will cause
make buildworld to fail.
Reviewed by: des, emaste
Approved by: des
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D46876
After commit 3bfbb521fe, -g stopped being a no-op. The -g hasn't
been required for equivalent output since 4.4BSD.
PR: 282901
Fixes: 3bfbb521 ls: Improve POSIX compatibility for -g and -n.
Right now, sockaddr_nl parameters are not displayed in kdump output,
however they are present in the structure in ktrace.out file when
ktrace is run.
Reviewed by: melifaro, markj, glebius
Differential Revision: https://reviews.freebsd.org/D47411
After commit 65a4daeaf3 ("ktrace: log execve(2) arguments and
environment"), "a" and "e" are part of the default set of trace points.
Reviewed by: markj
Approved by: emaste (mentor)
Fixes: 65a4daeaf3 ("ktrace: log execve(2) arguments and environment")
Differential Revision: https://reviews.freebsd.org/D47648
- loader.efi.8: use proper way of printing a backslash.
- usr.bin/gzip/gzip.1: contained a non-breaking space (in utf-8, 0xC2A0).
- lib/libpmc/pmc.*.3: remove two duplicate .Xr lines
Signed-off-by: Graham Percival <gperciva@tarsnap.com>
Reviewed by: mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
MFC after: 3 days
Sponsored by: Tarsnap Backup Inc.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1523
If the test runner is under heavy load, the command we are testing may
succeed in printing to stdout before the dummy receiver has terminated.
Add a short delay to reduce the likelihood of this happening.
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D47572
It was disabled by default in fe52b7f60e. We planned to (but did not)
remove the option before FreeBSD 14. Remove it now, for FreeBSD 15.
Relnotes: Yes
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31558
Two new events KTR_ARGS and KTR_ENV can be used to
trace arguments of execve(2).
Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D47127
Make explicit sed commands (first on commandline) behave the same
as those given with -e.
Without this patch the following two commands behave differently,
the second one being wrong:
echo ab | sed -e $'1 i\\\n--'
echo ab | sed $'1 i\\\n--'
Reviewed by: 0mp, des, kevans
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D47377
Fix the build on macOS
The bootstrap tools are statically linked, so our build system
will provide the full dependency chain which pulls in libcrypt.
since recently libcrypt.a is a linker script not supported by macOS
ar(1), given that compile_et does not use at all the function from
libroken which brings the dependency on libcrypt, bypass LIBADD
dependency chain by using the old LDADD/DPADD mechanism, like it is
done for other kerberos related bootstrap tools.
Using short temp filenames as /tmp/temp.XXXX (4 or 6 X) was probably ok
20 years ago, but not anymore. Best practice is to use 10 X. Given that our
users often copy & paste examples from our manual pages we need to
update the documentation.
PR: 261437
Now that we export the relevant stats via the net.route.stats sysctl,
switch to using that to avoid having to dig around in mem(4) for live
kernel statistics. Based on callers of kresolve_list(), this is the
last live path using mem(4) that could be functional today.
Tested both with `netstat -rs` and `netstat -rs -M`.
Note that this will not be able to extract stats from a running kernel
that predates 3360a15898 / 1500026, but this can be worked around by
specifying `-M /dev/mem` explicitly in the interim to fallback to
libkvm against /dev/mem.
Reviewed by: glebius, markj, zlei
Differential Revision: https://reviews.freebsd.org/D47231
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-19-init-18630-gf2ccf80136a0, the
last commit before the upstream release/19.x branch was created.
PR: 280562
MFC after: 1 month
A uzip image has a 128-byte header, historically, this header could be
executed as a shell script to mount the uzip image to a user provided
mountpoint.
The embedded shell commands only work for uzip images that were created
with zlib or zstd compression that contained an ISO-9660 file system.
Given the limited space available in the uzip header, it is not
practical to extend this feature to include other file systems or to
provide sensible error handling and error messages to the user.
For these reasons, abandon the embedded shell script in the uzip image
header.
To maintain backwards compatibility, the shebang and shell must reside
in the 128-byte header.
This change of behavior is documented in mkuzip(8) and an example
has been provided for creating/mounting uzip images.
PR: 276174
Libarchive 3.7.7
Security fixes:
#2158 rpm: calculate huge header sizes correctly
#2160 util: fix out of boundary access in mktemp functions
#2168 uu: stop processing if lines are too long
#2174 lzop: prevent integer overflow
#2172 rar4: protect copy_from_lzss_window_to_unp() (CVE-2024-20696)
#2175 unzip: unify EOF handling
#2179 rar4: fix out of boundary access with large files
#2203 rar4: fix OOB access with unicode filenames
#2210 rar4: add boundary checks to rgb filter
#2248 rar4: fix OOB in delta filter
#2249 rar4: fix OOB in audio filter
#2256 fix multiple vulnerabilities identified by SAST
#2258 cpio: ignore out-of-range gid/uid/size/ino and harden AFIO parsing
#2265 rar5: clear 'data ready' cache on window buffer reallocs
#2269 rar4: fix CVE-2024-26256 (CVE-2024-26256)
#2330 iso: be more cautious about parsing ISO-9660 timestamps
#2343 tar: clean up linkpath between entries
#2364 tar: don't crash on truncated tar archives
#2366 gzip: prevent a hang when processing a malformed gzip inside a gzip
#2377 tar: fix two leaks in tar header parsing
Important bugfixes:
#2096 rar5: report encrypted entries
#2150 xar: fix another infinite loop and expat error handling
#2173 shar: check strdup return value
#2161 lha: fix integer truncation on 32-bit systems
#2338 tar: fix memory leaks when processing symlinks or parsing pax headers
#2245 7zip: fix issue when skipping first file in 7zip archive that
is a multiple of 65536 bytes
#2252 7-zip: read/write symlink paths as UTF-8
#2259 rar5: don't try to read rediculously long names
#2290 ar: fix archive entries having no type
#2360 tar: fix truncation of entry pathnames in specific archives
CVE: CVE-2024-20696, CVE-2024-26256
PR: 282047 (exp-run)
MFC after: 1 week
A new utility which dumps MIDI 1.0 events in real-time.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: dev_submerge.ch
Differential Revision: https://reviews.freebsd.org/D46418
These were reported by `mandoc -T lint ...` as warnings:
- unusual Xr order
- unusual Xr punctuation
Fixes made by script in https://github.com/Tarsnap/freebsd-doc-scripts
Signed-off-by: Graham Percival <gperciva@tarsnap.com>
Reviewed by: mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
Sponsored by: Tarsnap Backup Inc.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1464
by being locale dependant the json export is invalid in locales where
the separator for float is a comma.
The Json and the XML are invalid for login-time when days contains
contains characters which are not unicode.
Forcing locale to be C, makes this json and xml output valid and also
identical accross locales, so reliable for parsers
PR: 276304
Reported by: Vedran Miletic <vedran@miletic.net>
When reading the next code in a stream, avoid reading an extra byte if
we're going to throw it away. When there's no more bits to extract from
the stream, bits will be 0 and we'll mask the read byte with 0 anyway.
At worst, this will avoid reading one past the end of gbuf array (which
is not possible in well formed streams).
PR: 127912
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D47041
The ldd32 binary is currently in the utilities package but belongs in
utilities-lib32. This patch corrects the situation.
PR: 249145
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D47023
POSIX requires us to print an error message and exit non-zero if
writing to stdout fails. This can only happen if sflag is unset.
MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D47020
These were reported by `mandoc -T lint ...` as errors.
The rendered output (in ascii and html) is not affected by this commit.
Signed-off-by: Graham Percival <gperciva@tarsnap.com>
Reviewed by: mhorne, Alexander Ziaee <concussious.bugzilla@runbox.com>
MFC after: 3 days
Sponsored by: Tarsnap Backup Inc.
Pull Request: https://github.com/freebsd/freebsd-src/pull/1454
This mirrors the equivalent option in GNU coreutils env, but does not
add support for long options.
MFC after: 3 days
Relnotes: yes
Sponsored by: Klara, Inc.
Reviewed by: 0mp, bcr
Differential Revision: https://reviews.freebsd.org/D47008
* The `env` utility's inability to run a command whose name contains an
equal sign is a feature, not a bug, so move that paragraph up from the
BUGS section to the DESCRIPTION section.
* Mention that this can be worked around by prefixing the command name
with `command`, and add an example of this to the EXAMPLE section.
* Add a test case which verifies that `env` does not run a command with
an equal sign in its name even if it exists, and also demonstrates the
workaround.
MFC after: 3 days
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D46997
This change adds the number of permanently allocated pages
to the 'sum' structure report.
Differential Revision: https://reviews.freebsd.org/D46980
Reviewed by: markj