aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* libpmc: remove unused auto_ptr warning suppressionHEADmainEd Maste13 hours1-3/+0
| | | | | | | | | | libpmc used -Wno-deprecated-declarations to silence warnings about usage of deprecated std::auto_ptr, but there is (now) now use of auto_ptr in libpmc. Reviewed by: mhorne Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37576
* googletest: remove unused auto_ptr warning suppressionEd Maste3 days1-3/+0
| | | | | | | | | | lib/googletest used -Wno-deprecated-declarations to silence warnings about usage of deprecated std::auto_ptr, but auto_ptr is not (now) used anywhere in googletest. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37561
* [skip ci] document first appearance of fhlink et alAlan Somers3 days3-3/+23
| | | | | | | MFC after: 1 week Sponsored by: Axcient Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D37575
* libc: remove unneeded sys/types.h include from several synopsesGuilherme Janczak4 days8-16/+8
| | | | | | | PR: 268028 Reviewed by: kib Discussed with: imp MFC after: 1 week
* pam.d: install hard link with same mode as targetEd Maste9 days1-0/+1
| | | | | | | | | | Previously when using NO_ROOT we recorded a METALOG entry for the pam.d/ftp hard link with a different file mode than the link target pam.d/ftpd, which is not permitted. This change is similar to 1dbb9994d4dd for .profile Sponsored by: The FreeBSD Foundation
* csu: Add missing GNU-stack annotations to note object files.John Baldwin2022-11-183-0/+6
| | | | | | ld.bfd marks the stack as executable for the crt objects due to the missing annotations which raises a fatal warning starting with version 2.39.
* vmm: Use struct vcpu in the instruction emulation code.John Baldwin2022-11-182-2/+2
| | | | | | | | | | | | | | | This passes struct vcpu down in place of struct vm and and integer vcpu index through the in-kernel instruction emulation code. To minimize userland disruption, helper macros are used for the vCPU arguments passed into and through the shared instruction emulation code. A few other APIs used by the instruction emulation code have also been updated to accept struct vcpu in the kernel including vm_get/set_register and vm_inject_fault. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D37161
* bhyve: Remove unused vm and vcpu arguments from vm_copy routines.John Baldwin2022-11-182-13/+12
| | | | | | | | The arguments identifying the VM and vCPU are only needed for vm_copy_setup. Reviewed by: corvink, markj Differential Revision: https://reviews.freebsd.org/D37158
* amd64 libc: add missed GNU-stack annotation to memmove/memcpyKonstantin Belousov2022-11-181-0/+2
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week
* MFV: expat 2.5.0Xin LI2022-11-182-5/+10
|\ | | | | | | MFC after: 2 weeks
| * Vendor import of expat 2.5.0vendor/expat/2.5.0vendor/expatXin LI2022-11-183-18/+35
| |
* | libarchive: Add missing MLINK.Dag-Erling Smørgrav2022-11-171-0/+1
| | | | | | | | Differential Revision: https://reviews.freebsd.org/D37398
* | MFV: Merge xz 5.2.8Xin LI2022-11-172-36/+90
| | | | | | | | | | Relnotes: yes MFC after: 2 weeks
* | libfetch: Pass a zeroed digest to DigestCalcResponse.John Baldwin2022-11-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | GCC 12 warns that passing "" (a constant of char[1]) to a parameter of type char[33] could potentially overread. It is not clear from the context that c->qops can never be "auth-int" (and if it can't, then the "auth-int" handling in DigestCalcResponse is dead code that should be removed since this is the only place the function is called). Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D36825
* | rpcb_clnt.c: Do not force use of UDPRick Macklem2022-11-131-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this patch, the code in the rpcbind client forces the use of UDP. A comment notes that some rpcbind servers only support UDP. This makes NFSv3 mounts to Azure servers impossible, since they require use of TCP for rpcbind. Since the comment is very old (imported from NetBSD in 2001) and I do not believe any UDP only rpcbind servers will still exist, this patch comments out the code that forces use of UDP, so that NFSv3 mounts to Azure servers can work. For an NFSv3 mount, the "udp" mount option will still make mount_nfs use UDP for rpcbind so that can be used as a workaround for any old NFSv3 server that only supports rpcbind over UDP (if any such server still exists). I asked if doing this change is appropriate on freebsd-fs@ and I only got one reply (off list) that supported doing the change. PR: 267301 MFC after: 1 month
* | Fix for tunefs(8) unable to add a UFS/FFS soft update journal.Kirk McKusick2022-11-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reported bug is UFS: bad file descriptor: soft update journaling can not be enabled on some FreeBSD-provided disk images – failed to write updated cg. The UFS library (libufs(3)) failed to reopen its disk descriptor when first attempting to update a cylinder group. The error only occurred when trying to add journaling to a filesystem whose first cylinder group was too full to hold the journal. PR: 259090 MFC after: 1 week Sponsored by: The FreeBSD Foundation
* | lib/libsecureboot: Fix some typosElyes HAOUAS2022-11-112-2/+2
| | | | | | | | | | Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Pull Request: https://github.com/freebsd/freebsd-src/pull/544
* | libc: Don't warn about RRSIG replies.Dag-Erling Smørgrav2022-11-092-2/+5
| | | | | | | | | | | | PR: 213178 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D37303
* | getsockopt.2: Clarify the SO_REUSEPORT_LB text a bitMark Johnston2022-11-021-4/+4
| | | | | | | | | | | | | | | | | | Refer to sockets rather than processes, since one can have multiple sockets in a load-balancing group within the same process. MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc.
* | libsysdecode: Match socket option names containing underscoresMark Johnston2022-11-021-1/+1
| | | | | | | | | | | | MFC after: 1 week Sponsored by: Modirum MDPay Sponsored by: Klara, Inc.
* | ktrace.2: Document KTRFAC_STRUCT_ARRAY.John Baldwin2022-11-021-1/+2
| | | | | | | | Sponsored by: DARPA
* | fetch: support EAI_ADDRFAMILY error, correct two error messagesMike Karels2022-11-021-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With the change to return EAI_ADDRFAMILY from getaddrinfo(), fetch would print "Unknown resolver error" for that error. Add that error and its string to libfetch's table, using an #ifdef just in case. Correct error strings for EAI_NODATA (although it is currently unused) and EAI_NONAME. Should maybe rework the code to use gai_strerror(3), but that doesn't map directly, and the current strings are shortened. Reviewed in https://reviews.freebsd.org/D37139 with related changes. Reviewed by: bz MFC after: 1 month
* | getaddrinfo: distinguish missing addrs from unresolvable namesMike Karels2022-11-021-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework getaddrinfo(3) to return different error values for unresolvable names (same as before, EAI_NONAME) and those without a requested addr (EAI_ADDRFAMILY) when using DNS. This is implemented via an added error in the nsswitch layer, NS_ADDRFAMILY, which is used only by getaddrinfo(). The error is passed through nsdispatch(3), but that routine has no changes to handle this error. The error originates in the getaddrinfo DNS layer called via nsdispatch(), and is processed by the search layer that calls nsdispatch(). While here, add a little style to returns near those that were modified. Reviewed in https://reviews.freebsd.org/D37139 with related changes. Reviewed by: bz MFC after: 1 month
* | gai_strerror.[c3]: re-enable EAI_ADDRFAMILY, EAI_NODATAMike Karels2022-11-022-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | gai_strerror.c still has messages for EAI_ADDRFAMILY and EAI_NODATA, but not the man page. Re-add to the man page, and update comments in the source. Document the errors that are not in RFC 3493 or POSIX. Reviewed in https://reviews.freebsd.org/D37139 with related changes. Reviewed by: bz, pauamma MFC after: 1 month
* | pf: bridge-toKristof Provost2022-11-022-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Allow pf (l2) to be used to redirect ethernet packets to a different interface. The intended use case is to send 802.1x challenges out to a side interface, to enable AT&T links to function with pfSense as a gateway, rather than the AT&T provided hardware. Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D37193
* | ipsec: add support for CHACHA20POLY1305Kristof Provost2022-11-021-0/+6
| | | | | | | | | | | | | | | | Based on a patch by ae@. Reviewed by: gbe (man page), pauamma (man page) Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D37180
* | libc_nonshared: Move to clibs packageDoug Rabson2022-11-011-0/+1
| | | | | | | | | | | | Its needed by libc.a which lives in clibs. PR: 254173
* | pf: expose syncookie active/inactive statusKristof Provost2022-10-312-0/+2
| | | | | | | | | | | | | | | | When syncookies are in adaptive mode they may be active or inactive. Expose this status to users. Suggested by: Guido van Rooij Sponsored by: Rubicon Communications, LLC ("Netgate")
* | strfmon: Remove XXX marksJose Luis Duran2022-10-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | phantom@'s HDD crashed with the final version of strfmon.c, as explained in 9d430a5991d3f64a75fee951a1efab3593207832. Now there are tests in place that cover these code paths. Reviewed by: kib PR: 267410 Github PR: #620 MFC after: 1 week
* | strfmon_l: Use specified locale for number formattingJose Luis Duran2022-10-292-26/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | strfmon_l does not take fully into consideration the explicitly passed locale to perform the formatting. Parallel universe bug report: https://sourceware.org/bugzilla/show_bug.cgi?id=19633 Obtained from: Darwin Reviewed by: kib PR: 267410 Github PR: #620 MFC after: 1 week
* | strfmon_test: Add a test for strfmon_lJose Luis Duran2022-10-291-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | Attempt to test the correctness of strfmon_l(3). Items marked with XXX represent an invalid output. Obtained from: https://github.com/NetBSD/src/commit/e7eba0044fe6128291cbb7e5923c7cf7d87318cc Reviewed by: kib PR: 267410 Github PR: #620 MFC after: 1 week
* | strfmon_test: Reserve space for the null terminatorJose Luis Duran2022-10-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise strfmon(3) could overflow the buffer. Here is mostly done for correctness and illustrative purposes, as there is no chance it could actually happen. Reviewed by: kib PR: 267410 Github PR: #620 MFC after: 1 week
* | strfmon_l(3): Add name to the man pageJose Luis Duran2022-10-291-3/+5
| | | | | | | | | | | | | | Reviewed by: kib PR: 267410 Github PR: #620 MFC after: 1 week
* | pkgbase: Put devmatch in its own packageEmmanuel Vadot2022-10-261-0/+1
| | | | | | | | | | | | | | devmatch is useful on standalone machine but not on jails. Put devinfo(8) and libdevinfo there too. Differential Revision: https://reviews.freebsd.org/D36229
* | pkgbase: Put ufs related tools and lib in their own packageEmmanuel Vadot2022-10-261-1/+1
| | | | | | | | | | | | | | | | It's not really useful in a jail or in a mdroot or even if a users wants to do a full zfs machine. Reviewed by: mckusick Differential Revision: https://reviews.freebsd.org/D36227
* | pkgbase: Put libwrap in FreeBSD-tcpd packageEmmanuel Vadot2022-10-261-1/+1
| | | | | | | | | | | | It belongs there with the tcp wrapper utilities Differential Revision: https://reviews.freebsd.org/D36226
* | pkgbase: Put zfs utilities and lib in their own packageEmmanuel Vadot2022-10-261-1/+1
| | | | | | | | | | | | | | | | | | It is useful to have zfs utilities and lib in a separate package as it allow users to create image that can support ZFS (i.e. not with WITHOUT_ZFS in src.conf set) without bloating the default image with all zfs tools (for example for jails). Differential Revision: https://reviews.freebsd.org/D36225
* | pkgbase: Put geom utilities in their own packageEmmanuel Vadot2022-10-2616-16/+16
| | | | | | | | | | | | | | | | For most users it's not needed to boot and they are also available in the FreeBSD-rescue package in case an update break and FreeBSD-geom package isn't updated correctly. Differential Revision: https://reviews.freebsd.org/D36224
* | strfmon(3): Fix # explanationJose Luis Duran2022-10-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There's only one value that specifies the number of digits after the decimal point (oh, sorry, the "radix character") the other specifies the number before... While here, add a little more info on the effects of using the #n value. Obtained from: https://github.com/NetBSD/src/commit/d1dd1a086400ae719bde1f2c45938d9bc1d29e8b Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
* | strfmon(3): Remove repeated wordsJose Luis Duran2022-10-251-1/+1
| | | | | | | | | | | | | | Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
* | strfmon: Fix formatting of a second fixed-width valueJose Luis Duran2022-10-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a bug when formatting two consecutive values using fixed-widths and the values need padding. This was because the value of pad_size was zeroed only every other time. Format Before After [%8n] [%8n] [ $123.45] [ $123.45] [ $123.45] [ $123.45] Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
* | strfmon: Fix an edge case when sep_by_space is 2Jose Luis Duran2022-10-252-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix an edge case by printing the required space when, the currency symbol succeeds the value, a space separates the sign from the value and the sign position precedes the quantity and the currency symbol. In other words: n_cs_precedes = 0 n_sep_by_space = 2 n_sign_posn = 1 From The Open Group's localeconv[1]: > When {p,n,int_p,int_n}_sep_by_space is 2: > If the currency symbol and sign string are adjacent, a space separates > them; otherwise, a space separates the sign string from the value. Format Before After [%n] [-123.45¤] [- 123.45¤] [1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/localeconv.html Obtained from: Darwin Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
* | strfmon: Fix alignment when enclosed by parenthesesJose Luis Duran2022-10-252-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take into consideration the possibility of quantities enclosed by parentheses when aligning. Matches the examples from The Open Group's: Format Before After %(#5n [$ 123.45] [ $ 123.45 ] Use an alternative pos/neg style [($ 123.45)] [($ 123.45)] [$ 3,456.78] [ $ 3,456.78 ] %!(#5n [ 123.45] [ 123.45 ] Disable the currency symbol [( 123.45)] [( 123.45)] [ 3,456.78] [ 3,456.78 ] https://pubs.opengroup.org/onlinepubs/9699919799/functions/strfmon.html SD5-XSH-ERN-29 is applied, updating the examples for %(#5n and %!(#5n. Obtained from: Darwin Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
* | strfmon: Trim the SPACE from international currency symbolJose Luis Duran2022-10-252-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The international currency symbol (int_curr_symbol) has a mandatory SPACE character as the last character. Trim this space after reading it, otherwise this extra space will always be printed when displaying the int_curr_symbol. Fixes the output when the international currency format is selected (%i). Locale Format Before After en_US.UTF-8 [%i] [USD 123.45] [USD123.45] fr_FR.UTF-8 [%i] [123,45 EUR ] [123,45 EUR] Note that the en_US.UTF-8 locale states that no space should be printed between the currency symbol and the value (sep_by_space = 0). Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
* | strfmon: Avoid an out-of-bounds accessJose Luis Duran2022-10-252-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid an out-of-bounds access when trying to set the space_char using an international currency format (%i) and the C/POSIX locale. The current code tries to read the SPACE from int_curr_symbol[3]: currency_symbol = strdup(lc->int_curr_symbol); space_char = *(currency_symbol+3); But on C/POSIX locales, int_curr_symbol is empty. Three implementations have been examined: NetBSD[1], Darwin[2], and Illumos[3]. Only NetBSD has fixed it[4]. Darwin and NetBSD also trim the mandatory final SPACE character after reading it. Locale Format Darwin/NetBSD FreeBSD/Illumos en_US.UTF-8 [%i] [USD123.45] [USD 123.45] fr_FR.UTF-8 [%i] [123,45 EUR] [123,45 EUR ] This commit only fixes the out-of-bounds access. [1]: https://github.com/NetBSD/src/blob/trunk/lib/libc/stdlib/strfmon.c [2]: https://opensource.apple.com/source/Libc/Libc-1439.141.1/stdlib/NetBSD/strfmon.c.auto.html [3]: https://github.com/illumos/illumos-gate/blob/master/usr/src/lib/libc/port/locale/strfmon.c [4]: https://github.com/NetBSD/src/commit/3d7b5d498aa9609f2bc9ece9c734c5f493a8e239 Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
* | strfmon: Fix typos in source code commentsJose Luis Duran2022-10-251-2/+2
| | | | | | | | | | | | | | | | | | | | s/defult/default s/internaltion/international Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
* | strfmon: Fix typo in constantJose Luis Duran2022-10-251-4/+4
| | | | | | | | | | | | | | | | | | s/SUPRESS_CURR_SYMBOL/SUPPRESS_CURR_SYMBOL Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
* | strfmon: Code cleanupJose Luis Duran2022-10-251-64/+68
| | | | | | | | | | | | | | | | | | | | No functional change intended. Not claiming full style(9) compliance. Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
* | strfmon_test: Add some testsJose Luis Duran2022-10-251-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempt to test the correctness of strfmon(3). Some of them were inspired from the examples section at: https://pubs.opengroup.org/onlinepubs/9699919799/functions/strfmon.html Items marked with XXX represent an invalid output. Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week
* | strfmon_test: Fix typo and remove extra spaceJose Luis Duran2022-10-251-2/+2
| | | | | | | | | | | | | | Reviewed by: kib PR: 267282 Github PR: #619 MFC after: 1 week