| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r320737:
Fix cleanup in lib/libc/gen/setdomainname_test
ATF cleanup routines run in separate processes from the tests themselves, so
they can't share global variables.
Also, setdomainname_test needs to be is_exclusive because the test cases
access a global resource.
PR: 219967
Reviewed by: ngie
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D11188
r320914:
Remove an extraneous strlen from t_setdomainname.c
Reported by: Coverity
CID: 1377568
X-MFC-With: 320737
Sponsored by: Spectra Logic Corp
|
|
|
|
|
|
| |
Reviewed by: jhb
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D11299
|
|
|
|
|
|
|
|
| |
MFC r316687 (by markj), r320314, r320317, r320338, r320339, r320344, r320430,
r320560 (by alc), r320801, r320843, r321173, r321230.
Tested by: pho
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for diff reduction purposes.
MFC r317315,r317437:
r317315:
Note that getpagesize(3) can return -1 on failure
r317437 (by kib):
getpagesize(3) cannot fail.
|
|
|
|
| |
localeconv(3): start sentences on new lines
|
|
|
|
|
|
| |
xdr(3): add missing comma after xdr_sizeof(3) in SYNOPSIS
This unbreaks the .Nm declaration
|
|
|
|
| |
__iconv_get_list: separate .Nm entries with commas
|
|
|
|
| |
sctp_send(3): start sentences on new lines
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r318704:
posix1e(3): reference using the section (3) when referencing libbsm with .Xr
r318708:
acl_create_entry(3): separate .Nm entries with commas in SYNOPSIS
r318709:
acl_to_text(3): start sentences on new lines
|
|
|
|
| |
quick_exit(3): delete trailing whitespace in licensing tort
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r318718:
rctl_add_rule(2): fix manlint warnings
- Fix commas (either missing or misused) after .Nm entries in SYNOPSIS
r318719:
open(2): fix manlint warnings
- Sort SEE ALSO .Xr entries.
- Sort sections (HISTORY comes after STANDARDS).
r318720:
ptrace(2): clean up trailing whitespace
r318721:
kill(2): add missing section for sysctl(9)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r319048:
Push `snapshot_file` copying down into run_tests function, and mark snapshot_file
const char *.
This fixes a bogus set of errors from gcc about strdup not being allowed a NULL
argument.
r319049:
Bump WARNS from 1 to 3 after recent commits to fix warnings in the
directory.
Tested with: clang 4.0, gcc 4.2.1, gcc 6.3.0
r319051:
hostent_test_getnameinfo_eq(..): initialize found_a_host to false
CID: 1368943
r319054:
hostent_test_getaddrinfo_eq(..): call freeaddrinfo on `ai` when done
This plugs a leak of memory allocated via getaddrinfo.
CID: 1346866
|
|
|
|
|
|
|
|
|
| |
getbsize(3): clarify that underflow/overflow warnings in regard to $BLOCKSIZE
gets output via warnx(3)
This helps set expectations for how one might deal with those messages, i.e.,
mute output from /dev/stderr today, since that's where vwarn(3) outputs messages
to today.
|
|
|
|
|
|
| |
err(3): use `NULL`, aka `(void*)0` per POSIX instead of `(FILE *)0`
This is being done to aid humans and static analysis checkers.
|
|
|
|
|
|
|
|
| |
fopen(3): make manlint fixes
- Break on new lines.
- Use .Dv with NULL.
- Rewrap lines as necessary/when possible.
|
|
|
|
|
|
| |
Make stdio deferred cancel-safe.
Requested by: eugen
|
|
|
|
| |
Correct signatures of several pthreads stubs.
|
|
|
|
| |
false positive reported by cppcheck.
|
|
|
|
|
|
|
|
|
|
|
| |
In r300388, endnetconfig() was called on nc_handle which would release
the associated netconfig structure, which means tmpnconf->nc_netid
would be a use-after-free.
Solve this by doing endnetconfig() in return paths instead.
Reported by: jemalloc via kevlo
Reviewed by: cem, ngie (earlier version)
|
|
|
|
| |
Do not leak syslog_mutex on cancellation.
|
|
|
|
|
|
|
|
| |
The documentation moved to section 3 several years ago, but
'man cap_rights_get' pulls up cap_rights_limit(2) (which is
MLINKed to cap_rights_get.2) instead of cap_rights_get(3).
Approved by: re (gjb)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* limit size of buffers to RPC_MAXDATASIZE
* don't leak memory
* be more picky about bad parameters
From:
https://raw.githubusercontent.com/guidovranken/rpcbomb/master/libtirpc_patch.txt
https://github.com/guidovranken/rpcbomb/blob/master/rpcbind_patch.txt
via NetBSD.
|
|
|
|
|
|
| |
Add tests for some cases in r318298.
PR: 219154
|
|
|
|
| |
Mention that the basep argument to getdirentries(2) can be NULL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r319027,r319028,r319029,r319030,r319031,r319033,r319034,r319035,r319036,r319037,r319038,r319039,r319040,r319041,r319042,r319043,r319044,r319045,r319046:
r319027:
lib/libc/tests/nss: use calloc appropriately
The pattern used prior to this commit was `calloc(1, n * sizeof(type))`;
the pattern that should be used however is `calloc(n, sizeof(type))`.
r319028:
Sort make variables to suit style.Makefile(5)
This is being done prior to functional changes.
r319029:
Staticize functions and remove unused variables to aid with bumping WARNS
r319030:
Fix -Wsign-compare warnings
r319031:
getusershell_test: staticize run_tests(..) to fix warnings
r319033:
getserv_test: fix -Wsign-compare and -Wmissing-prototypes warnings
r319034:
getaddrinfo_test: fix -Wsign-compare warnings
r319035:
getrpc_test: fix -Wmissing-prototypes and -Wsign-compare warnings
r319036:
getproto_test: fix -Wmissing-prototypes and -Wsign-compare warnings
r319037:
getaddrinfo_test: mark unused function parameters __unused to fix -Wunused
warnings
r319038:
getusershell_test: mark mdata parameter in compare_usershell __unused
r319039:
getserv_test: mark unused parameters __unused to fix corresponding
warnings
r319040:
getrpc_test: fix -Wunused warnings
- Mark unused function parameters unused.
- Remove an unused function prototype.
r319041:
getproto_test: fix -Wunused warnings
Mark unused parameters __unused in functions.
r319042:
gethostby_test: fix multiple warning types
- Fix -Wmissing-declaration warning by staticizing run_tests.
- Fix -Wsign-compare warnings by casting size_t types to int
for comparisons.
Reindent some of the code in sdump_hostent(..) to accomodate the
overall changes.
r319043:
getpw_test: fix -Wunused warnings
- Mark unused parameters __unused.
- Put dump_passwd under DEBUG as it's only used in that case.
r319044:
getgr_test: fix -Wunused warnings
r319045:
Fix -Wunused and -Wshadow warnings
r319046:
Fix a -Wunused-but-set-variable warning reported by gcc 6.3.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r318514:
Use size_t.
Inspired by: OpenBSD src/lib/libc/stdlib/qsort.c,v 1.11
r318515:
The current qsort(3) implementation ignores the sizes of partitions, and
always perform recursion on the left partition, then use a tail call to
handle the right partition. In the worst case this could require O(N)
levels of recursions.
Reduce the possible recursion level to log2(N) by always recursing on the
smaller partition instead.
Obtained from: PostgreSQL 9d6077abf9d6efd992a59f05ef5aba981ea32096
r318517:
Sync qsort.c with userland r318515.
(Note that MIN macro is removed in favor of sys/param.h's version).
PR: 213922
r318917:
Disconnect heimdal version of qsort.c from build because we are already
using libc's version of qsort.
PR: bin/213922
|
|
|
|
| |
Use ANSI C prototypes. Eliminates -Wold-style-definition warnings.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r279663:
qsort(3): enhance to handle 32-bit aligned data on 64-bit systems
Implement a small enhancement to the original qsort implementation:
If the data is 32 bit aligned we can side-step the long type
version and use int instead.
The change brings a modest but significant improvement in
32 bit workloads.
r279666:
qsort(3): small style(9) cleanups.
Basically spaces vs. tabs.
No functional change.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r315272:
Implement INHERIT_ZERO for minherit(2).
INHERIT_ZERO is an OpenBSD feature.
When a page is marked as such, it would be zeroed
upon fork().
This would be used in new arc4random(3) functions.
PR: 182610
Reviewed by: kib (earlier version)
Differential Revision: https://reviews.freebsd.org/D427
r315370:
The adj_free and max_free values of new_entry will be calculated and
assigned by subsequent vm_map_entry_link(), therefore, remove the
pointless copying.
Submitted by: alc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r315032:
Increase WARNS for iconv tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
r315033:
Increase WARNS for nss tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
r315034:
Document that the msun tests require WARNS=0
ATF tests have a default WARNS of 0, unlike other usermode programs. This
change is technically a noop, but it documents that the msun tests don't
work with any warnings enabled, at least not on all architectures.
Reviewed by: ngie
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
r315035:
Increase WARNS for libcrypt tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
r315036:
Increase WARNS for libmp tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
r315039:
Increase WARNS for libutil tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
r315041:
Increase WARNS for pw tests
ATF tests have a default WARNS of 0, unlike other usermode programs.
Reviewed by: ngie, julian
Sponsored by: Spectra Logic Corporation
Differential Revision: https://reviews.freebsd.org/D9933
|
|
|
|
| |
Style.
|
|
|
|
| |
Simplify cleanup on failure in realpath(3).
|
|
|
|
|
|
| |
Fix several buffer overflows in realpath(3), and other minor issues.
PR: 219154
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r317660:
Support clnt_raw's use of FD_SETSIZE as a fake file descriptor.
Accomplish this by allocating space for it in __svc_xports and allowing
it to be registered. The failure to allocate space was causing an
out-of-bounds read in svc_getreq_common(). The failure to register
caused PR 211804.
The bug was found with CHERI bounds checking.
PR: 211804
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D10528
r317710:
Remove expected failure now that it was fixed in r317660.
PR: 211804
Reviewed by: ngie
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10576
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r317845:
Provide a freebsd32 implementation of sigqueue()
The previous misuse of sys_sigqueue() was sending random register or
stack garbage to 64-bit targets. The freebsd32 implementation preserves
the sival_int member of value when signaling a 64-bit process.
Document the mixed ABI implementation of union sigval and the
incompability of sival_ptr with pointer integrity schemes.
Reviewed by: kib, wblock
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10605
r317846:
Regen post r317845.
MFC with: r317845
Sponsored by: DARPA, AFRL
|
|
|
|
| |
Improve grammar.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Correct an out-of-bounds read in regcomp when the RE is bad.
When passed the invalid regular expression "a**", the error is
eventually detected and seterr() is called. It sets p->error
appropriatly and p->next and p->end to nuls which is a never used char
nuls[10] which is zeros due to .bss initialization. Unfortunatly,
p_ere_exp() and p_simp_re() both have fall through cases where they set
the error, decrement p->next and access it which means a read from
whatever .bss variable comes before nuls.
Found with regex_test:repet_multi and CHERI bounds checking.
Reviewed by: ngie, pfg, emaste
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D10541
|
|
|
|
| |
Make semaphore names list mutex non-recursive.
|
|
|
|
| |
Restructure normal (non-error) control flow in sem_close().
|
|
|
|
| |
Style.
|
|
|
|
| |
getpagesize(3) cannot fail.
|
|
|
|
|
|
|
|
|
|
| |
When application reads large directory, calling telldir() for each entry,
like Samba does, it creates exponential performance drop as number of
entries reach tenths to hundreds of thousands. It is caused by full search
through the internal list, that never finds matches in that scenario, but
creates O(n^2) delays. This patch optimizes that search, limiting it to
entries of the same buffer, turning time closer to O(n) in case of linear
directory scan.
|
|
|
|
|
|
|
|
|
|
| |
Fix an out-of-bounds write when a zero-length buffer is passed.
Found with ttyname_test and CHERI bounds checking.
Reviewed by: emaste
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
|
|
|
|
| |
Fix reporting of _SC_SEM_NSEMS_MAX and _SC_SEM_VALUE_MAX.
|
|
|
|
| |
style(9): sort #includes
|
|
|
|
|
|
| |
libc: mall cleanup.
Let calloc(3) do the multiplication.
|
|
|
|
| |
style(9): sort the #includes
|
|
|
|
|
|
|
|
| |
Discard first 3072 bytes of RC4 keystream, this is a bandaid
that allows us to work on switching to a more modern PRNG.
Submitted by: Steven Chamberlain <steven pyro eu org>
Approved by: so
|
|
|
|
| |
Move ATF_TC_WITHOUT_HEAD(getgrent) near the testcase it annotates
|
|
|
|
|
|
| |
Make several improvements and corrections in the kenv(2) man page
Sponsored by: Dell EMC
|