| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r289172:
Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)
- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity
r290254:
Remove unused variable (SRCDIR)
|
| |
|
|
|
|
|
|
|
|
|
| |
sort - Don't live-loop threads.
Worker threads now use a pthread_cond_t to wait for work instead of
burning the cpu up.
Obtained from: DragonflyBSD (07774aea0ccf64a48fcfad8899e3bf7c8f18277a)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r311160:
misc minor fixes in mpr(4)
sys/dev/mpr/mpr_sas.c
* Fix a potential null pointer dereference (CID 1305731)
* Check for overrun of the ccb_scsiio.cdb_io.cdb_bytes buffer (CID
1211934)
sys/dev/mpr/mpr_sas_lsi.c
* Nullify a dangling pointer in mprsas_get_sata_identify
* Fix a memory leak in mprsas_SSU_to_SATA_devices (CID 1211935)
Reported by: Coverity (partially)
CID: 1305731 1211934 1211935
Reviewed by: slm
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D8880
r311210:
Quell Coverity for diskinfo(8)
* CID 1198994: Don't run the speed disk on a disk with no sectors
* CID 1011442: Don't call close(2) if open(2) fails
* CID 1011161: Use snprintf instead of sprintf
* CID 1009825: Check the return value of lseek
Reported by: Coverity
CID: 1198994 1011442 1011161 1009825
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
r311288:
Delete dead code in chat(8)
It's always been dead, ever since first import in 1994. It's still dead in
OpenBSD's version, too.
Reported by: Coverity
CID: 270586
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
r311292:
Remove dead code in rpc_parse.c
It's been dead ever since it was imported from TI-RPC in 1995. The dead
code is still present in Illumos today, but was removed from NetBSD in 2006.
Reported by: Coverity
CID: 270097
Obtained from: NetBSD
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
r311298:
Remove dead code in dhclient(8)
The offending code has been dead ever since the import from OpenBSD in
r195805. OpenBSD later deleted that entire function.
Reported by: Coverity
CID: 500059
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
r311340:
Misc Coverity fixes for tail(1)
CID 1006402: Initialize stack variable
CID 271580: Don't leak memory when ENOMEM.
Reported by: Coverity
CID: 271580 1006402
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of collecting statistics for each combination of ports and logical
units, that consumed ~45KB per LU with present number of ports, collect
separate statistics for every port and every logical unit separately, that
consume only 176 bytes per each single LU/port. This reduces struct
ctl_lun size down to just 6KB.
Also new IOCTL API/ABI does not hardcode number of LUs/ports, and should
allow handling of very large quantities.
Old API is still enabled in stable branches for compatibility reasons.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rpcgen(1): Avoid unused variable warning on generated code.
Avoid "unused variable 'i'" warnings in generated .c files by only
emitting the "int i;" for non-opaque arrays. Opaque arrays use
xdr_opaque() rather than iterating over the array.
Obtained from: OpenBSD (CVS rev 1.28)
rpcgen(1): Check getrlimit() return for generated code.
Obtained from: NetBSD (CVS rev 1.27, 1.28)
|
| |
|
|
|
|
|
|
| |
Fix rstat: symbol not in namelist from netstat
Sponsored by: Multiplay
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r266773 (by jhb):
Fix a couple of size_t != int warnings.
r280680 (by kevlo):
Print size_t's with %zu rather than "%zd.
r311710:
Style fixes
- Delete trailing whitespace
- Use nitems(mib) instead of hardcoding the mib length
|
|
|
|
|
|
|
|
|
|
|
| |
The kernel uses a few negative errno values for internal conditions
such as requesting a system call restart. Normally these errno values
are not exposed to userland. However, kdump needs access to these
values as some of then can be present in a ktrace system call return
record. Previously kdump was defining _KERNEL to gain access to ehse
values, but was then having to manually declare 'errno' (and doing it
incorrectly). Now, kdump uses _WANT_KERNEL_ERRNO instead of _KERNEL
and uses the system-provided declaration of errno.
|
|
|
|
|
| |
In particular, decode the off_t argument as a 64-bit argument to fix
decoding for 32-bit processes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In particular, 64-bit system call arguments use up two register_t
arguments for 32-bit processes. They must also be aligned on a 64-bit
boundary on 32-bit powerpc processes. This fixes the decoding of
lseek(), procctl(), and wait6() arguments for 32-bit processes (both
native and via freebsd32).
Note that the ktrace system call return record only returns a single
register, so the return value of lseek is always truncated to the low
32-bits for 32-bit processes.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Export the whole thread name in kinfo_proc
kinfo_proc::ki_tdname is three characters shorter than
thread::td_name. Add a ki_moretdname field for these three
extra characters. Add the new field to kinfo_proc32, as well.
Update all in-tree consumers to read the new field and assemble
the full name, except for lldb's HostThreadFreeBSD.cpp, which
I will handle separately. Bump __FreeBSD_version.
Sponsored by: Dell EMC
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
locale: fix buffer management
Also, handle signed and unsigned chars, and more gracefully handle
invalid input.
locale: enable more warnings; fix them
Do not set WARNS, so it gets the current default of 6.
Fix the warnings by sprinkling static, const, or strdup.
Make some constant data tables const. Fix whitespace.
Sponsored by: Dell EMC
|
|
|
|
|
|
|
|
| |
r309232: Fix an obvious typo.
r309233: Eliminate variables that are computed, assigned but
never used.
r309234: pages and psize are always assigned, so there is no
need to initialize them as zero.
|
|
|
|
| |
style(9) indent changes, no actual code change.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r298183 (by araujo):
Use NULL for pointers.
strrchr(3) will return NULL if the character does not appears in
the string.
r304226 (by araujo):
Use nitems() from sys/param.h.
|
|
|
|
|
|
|
|
| |
ncal: fix a reference to an out-of-scope stack buffer
PR: 214237
Submitted by: Jonathan de Boyne Pollard
Sponsored by: Dell EMC
|
|
|
|
|
|
|
|
|
|
| |
locale: fix display of "grouping" and "mon_grouping" values
The "grouping" and "mon_grouping" values are arrays of one-byte
integers, not arrays of ASCII characters. Display them in a format
similar to GNU and MacOS.
Sponsored by: Dell EMC
|
| |
|
|
|
|
|
|
|
|
|
| |
Make the autofs(5) -hosts map more robust, primarily to make it correctly
handle NFS shares containing whitespace. This also adds the -E parameter
to showmount(8).
PR: 207596
Differential Revision: https://reviews.freebsd.org/D5649
|
|
|
|
|
|
|
| |
Update libarchive to 3.2.2
Most of the post-3.2.1 fixes have already been merged. This update contains
just the version bump and some fixes to the test framework.
|
|
|
|
|
|
|
|
|
| |
When threads were added to the kernel, the pr_pid member of the
NT_PRSTATUS note was repurposed to store LWP IDs instead of process
IDs. However, the process ID was no longer recorded in core dumps.
This change adds a pr_pid field to prpsinfo (NT_PRSINFO). Rather than
bumping the prpsinfo version number, note parsers can use the note's
payload size to determine if pr_pid is present.
|
|
|
|
|
|
| |
r109332 introduced these three as DT_SUNW_*. Update to the correct
names already used elsewhere in FreeBSD and the Sun "Linker and
Libraries Guide"
|
| |
|
|
|
|
|
|
|
|
|
| |
patch(1): make some macros look boolean.
Minor cleanup inspired by a new patch(1) variant in schily tools.
For reference:
https://sourceforge.net/p/schillix-on/
|
|
|
|
|
| |
Fill in pr_psargs in the NT_PRSINFO ELF core dump note with command
line arguments.
|
|
|
|
|
|
|
|
|
| |
Use size of destination buffer, rather than a constant that may or may not
correspond to the source buffer, to restrict the length of copied strings. In
particular, pr_fname has 16+1 characters but MAXCOMLEN is 18+1.
Use strlcpy instead of strncpy to ensure the result is nul-terminated. This
seems to be what is expected of these fields.
|
| |
|
|
|
|
| |
Update mkimg(1) author's contact info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r304691: bspatch: apply style(9)
Make style changes (and trivial refactoring of open calls) now in order
to reduce noise in diffs for future capsicum changes.
r304807 (allanjude): Capsicumize bspatch
Move all of the fopen() and open() calls to the top of main()
Restrict each FD to least privilege (read/seek only, write only, etc)
cap_enter(), and make all except the output FD read/seek only.
r304821: bspatch: remove output file in the case of error
r305486: bspatch: add sanity checks on sizes to avoid integer overflow
Note that this introduces an explicit 2GB limit, but this was already
implicit in variable and function argument types.
This is based on the "non-cryptanalytic attacks against freebsd
update components" anonymous gist. Further refinement is planned.
r305737: bspatch: remove superfluous newlines from errx strings
r305822: bspatch: use #define for header size instead of magic number
r306026: bspatch: Remove backwards-compatibility sys/capability.h support
bspatch previously included sys/capability.h or sys/capsicum.h based
on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may
see this file incorporated into other third-party software.
The Capsicum header is now installed as sys/capsicum.h in stable/10 and
FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic.
|
|
|
|
|
|
|
|
|
| |
- Introduce a separate usage() function.
- Don't use argv[0]. Directly name the application, as we do elsewhere.
- Don't prepend the application name.
- Don't print two newlines.
Also apply the unnecessary semicolon cleanup from r298089
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Squelch clang 3.9.0 warnings about BASE (which is 32768) being converted
to -32768 when it is used as an argument to mp_itom(), in both libtelnet
and newkey. This code has been wrong since r26238 (!), so after almost
20 years it is rather useless to try to correct it.
MFC r305086:
Fix warnings in telnet about invalid constant conversions, e.g.:
contrib/telnet/telnet/commands.c:2914:13: error: implicit conversion
from 'int' to 'char' changes value from 137 to -119
[-Werror,-Wconstant-conversion]
*lsrp++ = IPOPT_SSRR;
~ ^~~~~~~~~~
/usr/include/netinet/ip.h:152:21: note: expanded from macro 'IPOPT_SSRR'
#define IPOPT_SSRR 137 /* strict source route */
^~~
contrib/telnet/telnet/commands.c:2916:13: error: implicit conversion
from 'int' to 'char' changes value from 131 to -125
[-Werror,-Wconstant-conversion]
*lsrp++ = IPOPT_LSRR;
~ ^~~~~~~~~~
/usr/include/netinet/ip.h:148:21: note: expanded from macro 'IPOPT_LSRR'
#define IPOPT_LSRR 131 /* loose source route */
^~~
Use unsigned char buffers instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r303804:
Fix building usr.bin/tar/tests with PIE symbol building enabled by
removing CFLAGS+= -static
`CFLAGS+= -static` was a carryover from pre-r289195 with
usr.bin/tar/test/Makefile that should have been specified in LDFLAGS
There doesn't seem to be an apparent need for static compilation
of the test binaries.
Obtained-from: opBSD (418a491eed20d2603ddd1f1bd92c2c0d95094002)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r304949:
MFC r303830,r304693,r304694,r304698:
r303830:
Remove vestigal references to __alpha__
Replace alpha reference in getconf(1) with amd64 [*]
PR: 211300 [*]
r304693:
Clean up trailing whitespace
r304694:
Add `MIN_HOLE_SIZE` pathconf(2) support to getconf
This allows shell programs to programmatically determine whether
or not a filesystem supports sparse files
r304698:
Add support for _PC_ACL_NFS4 as TRUSTEDBSD_ACL_NFS4
The TRUSTEDBSD prefix was chosen for consistency with the other
related `_PC_ACL*` prefixed variables.
r305226:
MFC r304809:
Add non-TRUSTEDBSD prefixed knobs for the _PC_ACL* and {CAP,INF,MAC}_PRESENT knobs
It's not necessarily intuitive that the variables to query contain TRUSTEDBSD
in the prefix. Add non-TRUSTEDBSD prefixed knobs for querying things like
"_PC_ACL_NFS4".
Relnotes: yes
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r303929:
Fix -S with -b not atomically updating the destination file.
r303930:
Support -v for -l.
r303931:
Fix -S with -l not being atomic.
r303932:
Fix -b failure not restoring flags on the destination file.
r303933:
Squelch a false-positive Clang static analyzer warning.
|
|
|
|
|
|
|
|
|
|
| |
MFC r303830:
Remove vestigal references to __alpha__
Replace alpha reference in getconf(1) with amd64 [*]
PR: 211300 [*]
|
|
|
|
|
|
|
|
|
| |
r303934:
Support rmdir(2).
r303937:
Use proper argument length for rmdir(2) for r303934.
r303942:
Fix sorting in r303934.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Do not look for more matching lines if -L is specified
Submitted by: eadler (based on)
MFC r296799 (by ian):
Fix a bug in bsdgrep that caused the program to hang in a tight loop for
some combinations of command line options and search patterns. The code was
examining regexec flags looking for a regcomp flag value. The fix is to
look in the struct field where the decoded regcomp flag was stored when the
regex was compiled.
With this fix, it's possible to build WITHOUT_GNU_GREP_COMPAT and
WITH_BSDGREP and have a usable GPL-free grep (which of course lacks gnugrep
extensions). It now passes the kyua tests except for one test that requires
the -z/--null-data gnu extension, and one test involving outputting context
lines across multiple files which appears to sometimes output an extra
delimiter line ("--") between matches (a rather obscure failure of a rather
obscure feature, so bsdgrep should be generally usable now).
MFC r303676:
Fix a segfault in bsdgrep when parsing the invalid extended regexps "?"
or "+" (these are invalid, because there is no preceding operand).
When bsdgrep attempts to emulate GNU grep in discarding and ignoring the
invalid ? or + operators, some later logic in tre_compile_fast() goes
beyond the end of the buffer, leading to a crash.
Fix this by bailing out, and reporting a bad pattern instead.
Reported by: Steve Kargl
|
|
|
|
| |
Add support to systat to display zfs arc cache status/info
|
|
|
|
| |
Fix date.
|
|
|
|
|
|
| |
mail(1): Avoid closing negative file descriptors.
CID: 1008105, 1008106
|
|
|
|
|
|
| |
Obtained from: Chromium
Reported by: Lu Tung-Pin
Security: FreeBSD-SA-16:25.bspatch
|
|
|
|
|
|
|
|
|
| |
ar output is already deterministic by default for ar -q and ar -r, and
when invoked as ranlib. Make ar -s equivalent to ranlib and enable
deterministic output by default in that case too.
PR: 210330
Sponsored by: The FreeBSD Foundation
|
|
|
|
| |
Use _PATH_DEVNULL instead of hardcoding.
|
|
|
|
|
| |
Optimize [Cc]flag case: don't repeatedly add the last character of
string2 to squeeze cset when string2 reach its EOS state.
|
|
|
|
| |
Document incomplete support of [=equiv=] and collation for ranges.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which includes:
o LZMA compression;
o block de-duplication;
o performance improvements;
o multi-thread support.
This includes the following revisions:
r295943,r296626,r296628,r296810,r298504,r298505,r298577
Suggested by: emaste
|
|
|
|
| |
Trace timeval parameters to the getitimer(2) and setitimer(2) syscalls.
|