libc: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manual - errorp
libc: further adoption of SPDX licensing ID tags.Mainly focus on files that use BSD 2-Clause license, however the tool Iwas using mis-identified many licenses so this was mostly a manual - errorprone - task.The Software Package Data Exchange (SPDX) group provides a specificationto make it easier for automated tools to detect and summarize well knownopensource licenses. We are gradually adopting the specification, notingthat the tags are considered only advisory and do not, in any way,superceed or replace the license texts.
show more ...
Use on crypto.x and rpc.x from the source tree.This fixes the build when DESTDIR may be blank or not yet populated.It also fixes reproducibility.Submitted by: brooksApproved by: re (gjb)Differ
Use on crypto.x and rpc.x from the source tree.This fixes the build when DESTDIR may be blank or not yet populated.It also fixes reproducibility.Submitted by: brooksApproved by: re (gjb)Differential Revision: https://reviews.freebsd.org/D6455
libc: do not include <sys/types.h> where <sys/param.h> was already includedAccording to style(9):> normally, include <sys/types.h> OR <sys/param.h>, but not both.(<sys/param.h> already includes <
libc: do not include <sys/types.h> where <sys/param.h> was already includedAccording to style(9):> normally, include <sys/types.h> OR <sys/param.h>, but not both.(<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).
If a NIS server has long entries on its database that is bigger than1024 specified on YPMAXRECORD the ypmatch can get in an infinite retryloop when is requesting the information from the NIS server
If a NIS server has long entries on its database that is bigger than1024 specified on YPMAXRECORD the ypmatch can get in an infinite retryloop when is requesting the information from the NIS server.The ypmatch(1) will return an error until the command receives ankill(1).To avoid this problem, we check the MAX_RETRIES that is by default setto 20 and avoid get in infinet loop at the client side.NOTE: FreeBSD nis(8) server doesn't present this issue.Submitted by: Ravi Pokala <[email protected]>, Lakshmi N. Sundararajan <[email protected]>, Lewis, Fred <[email protected]>, Pushkar Kothavade <[email protected]>Approved by: bapt (mentor)MFC after: 1 monthDifferential Revision: D4095
Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}if not already defined. This allows building libc from outside oflib/libc using a reach-over makefile.A typical use-case is to
Replace use of ${.CURDIR} by ${LIBC_SRCTOP} and define ${LIBC_SRCTOP}if not already defined. This allows building libc from outside oflib/libc using a reach-over makefile.A typical use-case is to build a standard ILP32 version and a COMPAT32version in a single iteration by building the COMPAT32 version using areach-over makefile.Obtained from: Juniper Networks, Inc.
libc: Use O_CLOEXEC for various internal file descriptors.This fixes a race condition where another thread may fork() before CLOEXECis set, unintentionally passing the descriptor to the child proc
libc: Use O_CLOEXEC for various internal file descriptors.This fixes a race condition where another thread may fork() before CLOEXECis set, unintentionally passing the descriptor to the child process.This commit only adds O_CLOEXEC flags to open() or openat() calls where nofcntl(fd, F_SETFD, FD_CLOEXEC) follows. The separate fcntl() call stillleaves a race window so it should be fixed later.
Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessorset via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.MFC after: 1 week
Handle malloc failures in yplib.c.PR: bin/83349
Handle failures to malloc memory to hold key or val copies.PR: bin/83348
Remove duplicate "in".Suggested by: Rob Farmer <rfarmer at predatorlabs.net>MFC after: 3 days
Revert some of r177626. "in in" is valid in certain sentences.PR: 121490MFC after: 3 days
Eliminate more dead stores.Found by: Clang static analyzerMFC after: 7 days
Fix some "in in" typos in comments.PR: 121490Submitted by: Anatoly Borodin <[email protected]>Approved by: rwatson (mentor), jkoshyMFC after: 3 days
Set timeout for all NIS RPC requests to 1 second and not just foryp_next as revision 1.50 did. This should fix, or at least very muchreduce the risk of, NIS timing out due to UDP packet loss for N
Set timeout for all NIS RPC requests to 1 second and not just foryp_next as revision 1.50 did. This should fix, or at least very muchreduce the risk of, NIS timing out due to UDP packet loss for NISfunctions.See also revision 1.50 for more details about the general problem.Tested by: nosedive, freefall, hub, mx1, brooksMFC after: 1 weekApproved by: re (mux)
Use C comments since we now preprocess these files with CPP.
- Bump _yplib_timeout limit from 10 to 20 seconds to better handle packet loss when talking to a NIS server.- Set 1 second retry timeout to further realistically handle UDP packet loss for yp_ne
- Bump _yplib_timeout limit from 10 to 20 seconds to better handle packet loss when talking to a NIS server.- Set 1 second retry timeout to further realistically handle UDP packet loss for yp_next packet bursts. If the packet hasn't come back within 1 second its rather unlikely to come back at all. There is still back-off mechanism in RPC so if there is another reason than packet loss for the lack of response within 1 second, the NIS server will not be totally bombarded with requests.This reduces the risk of NIS failing with: yp_next: clnt_call: RPC: Timed outconsiderably. This is mainly a problem if you have larger NIS maps(like at FreeBSD.org) since enumerations of the lists will cause a UDPpacket bursts where a few packets being lost once in a while dohappen.MFC after: 1 weekDiscussed with: peterProblem mainly diagnosed by: peter
Add each directory's symbol map file to SYM_MAPS.
Add symbol maps and initial symbol version definitions to libc.Reviewed by: davidxu
do mutex lock for each yp calls. with this, http://cvsweb.netbsd.org/bsdweb.cgi/src/regress/lib/libpthread/resolv/is working.
MUTEX_INITIALIZER should be used instead ofPTHREAD_MUTEX_INITIALIZER, here.
protect _yp_domain with mutex lock.Inspired by: NetBSD
Use socklen_t where appropriate.
Back out the `hiding' of strlcpy and strlcat. Several peoplevocally objected to this safety belt.
`Hide' strlcpy and strlcat (using the namespace.h / __weak_referencetechnique) so that we don't wind up calling into an application'sversion if the application defines them.Inspired by: qpopper's
`Hide' strlcpy and strlcat (using the namespace.h / __weak_referencetechnique) so that we don't wind up calling into an application'sversion if the application defines them.Inspired by: qpopper's interfering and buggy version of strlcpy
libc_r wasn't so tied to libc for 22 months.
123