[clangd] Log environment variables that influence compilation at startup (#204990)
When users face missing system include issues (especially on Windows),
it's difficult to diagnose whether the problem is caused by missing
environment variables like `INCLUDE`, `CPATH`, etc.
This patch logs the values of environment variables that influence how the
compiler finds headers and libraries, at startup alongside the existing
version/PID/argv logs. Only variables that are actually set are printed.
Variables logged:
- MSVC (set by vcvarsall.bat): `INCLUDE`, `LIB`, `LIBPATH`, `CL`, `_CL_`
- GCC/Clang: `CPATH`, `C_INCLUDE_PATH`, `CPLUS_INCLUDE_PATH`,
`OBJC_INCLUDE_PATH`, `LIBRARY_PATH`, `GCC_EXEC_PREFIX`
Fixes https://github.com/clangd/clangd/issues/2657
NAS-141441 / 27.0.0-BETA.1 / Fix missing 2FA account flag and re-enable STIG tests (#19151)
AccountFlag.TWOFACTOR was set in _get_user_obj() based on
self.twofactor_user, which only becomes true after the PAM OATH
conversation runs -- i.e. it was always false at that point. As a result
2FA web sessions never carried the '2FA' flag and validate_stig()
rejected every credential, blocking STIG enablement. This is why the
suite had been failing for months.
Set TWOFACTOR in authenticate_oath() on success instead, where the
second factor has actually been verified, mirroring how OTPW is
recorded. Drop the now-dead check from _get_user_obj().
Re-enable tests/stig test_01 and test_02 and restore the conftest server
setup. test_03 stays skipped.
(cherry picked from commit 1437d96a5f91b82640b483254fc357fde6a99237)
libusb: implement zlp flag in libusb transfer
The USB protocol defines a Zero-Length Packet (ZLP) to signal the end of
a transfer when the data size is an exact multiple of the Maximum Packet
Size (MPS). Without a ZLP in such cases, the device may not be able to
determine that the transfer has completed.
This flag is added to libusb to allow the user send a ZLP in the end
of libusb_xfer.
Reviewed by: adrian
Sponsored by: The FreeBSD Foundataion
Differential Revision: https://reviews.freebsd.org/D51759
libusb: implement IAD parser
libusb provide functions to parse interface association descriptor. This
descriptor indicates that a function is composed by multiple interface
and which interfaces is associate to the target function. This
descriptor is not a separate USB require, instead, it comes with the
config descriptor.
Reviewed by: adrian
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50958
libusb: implement libusb_get_max_alt_packet_size
The libusb has a function to calculate the size from given interface,
alt_setting, endpoint. Implementing it by refactoring the calculating
function for libusb_get_max_iso_packet_size.
Reviewed by: adrian
Sponsored By: FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51225
libusb: implement libusb_set_option
Implement libusb_set_option for API compatibility of libusb upstream
The implementation status of each option is as following:
LIBUSB_OPTION_LOG_LEVEL: just like libusb_set_debug
LIBUSB_OPTION_LOG_CB: add callback support for DPRINTF
LIBUSB_OPTION_NO_DEVICE_DISCOVERY: disable initialization of devd and
netlink when register. Also, create no thread when registration of
callback happens.
LIBUSB_OPTION_USE_USBDK: no needed as USBDK is for Windows
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50818
Fix handling of _PC_HAS_HIDDENSYSTEM for FreeBSD
The hidden and system flags are only supported for
ZFS pools if the z_use_fuids is true. Fix
zfs_freebsd_pathconf() to check this.
Reviewed-by: Alexander Motin <alexander.motin at TrueNAS.com>
Signed-off-by: Rick Macklem <rmacklem at uoguelph.ca>
Closes #18688
tests.7: Remove an unused configuration variable
No existing tests require it, and I cannot understand what kinds of test
scenarios are supposed to require it. Just remove it.
While here, improve the documentation of test variables a bit.
Reviewed by: ngie
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D56604
(cherry picked from commit 6bd97b5f3778aa36bcf89ff870bb1483b301a9be)
rpcsec_tls: Avoid a socket reference underflow in rpctls_server()
The upcall_sockets tree owns a ref on any resident socket. When a
socket is removed after a TLS handshake failure, rpctls_rpc_failed()
thus calls soclose().
rpctls_server() does not acquire an extra ref to compensate for this.
So, if the upcall fails, e.g., because rpc.tlsservd is not running,
we'll call soclose() to drop the reference, but this effectively
releases the xprt layer's reference.
Fix the problem by explicitly acquiring a socket reference when adding
a socket to the upcall tree.
PR: 289734
Reviewed by: rmacklem, glebius
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57555
[2 lines not shown]
tests: Fix race condition in aslr_setuid
Use a cloexec pipe to block the parent until the child is ready.
While here, redirect the output from ping to /dev/null, and mark the
test as requiring the inet feature since we ping the IPv4 loopback.
PR: 296116
MFC after: 1 week
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D57734
The mwx_delete_key() callback from net80211 can't use a task.
While adding a key must be done via task to be able to sleep, the
delete key operation must operate in fire and forget mode because
defering the work results in a use-after-free (or at least bzero).
Because of this split the functions to update and remove a key
and use the no wait msg sending function in the delete case.
This fixes a panic on interface down.