aboutsummaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Make snprintf(3) and vscanf(3) definitions available under appropriateKonstantin Belousov2019-09-091-3/+5
| | | | | | | | | | | | POSIX visibility. Reported by: jbeich Reviewed by: jilles PR: 207287 MFC after: 1 week Notes: svn path=/head/; revision=352056
* pkgbase: Add TAG for evdev and veriexec headersEmmanuel Vadot2019-09-051-4/+4
| | | | | | | | Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D21505 Notes: svn path=/head/; revision=351857
* libc: remove getsEd Maste2019-09-011-1/+0
| | | | | | | | | | | | | | | | | | | | gets is unsafe and shouldn't be used (for many years now). Leave it in the existing symbol version so anything that previously linked aginst it still runs, but do not allow new software to link against it. (The compatability/legacy implementation must not be static so that the symbol and in particular the compat sym gets@FBSD_1.0 make it into libc.) PR: 222796 (exp-run) Reported by: Paul Vixie Reviewed by: allanjude, cy, eadler, gnn, jhb, kib, ngie (some earlier) Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D12298 Notes: svn path=/head/; revision=351659
* Increase YPMAXRECORD to 16M to be compatible with Linux.Konstantin Belousov2019-08-123-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Since YP protocol definition uses the constant to declare variable-size opaque byte strings, the change should be binary compatible with existing installations which do not expose keys or values larger than 1024 bytes. All uses of local variables with YPMAXRECORD sizes were removed to avoid insane stack use. On the other hand, variables with static lifetime should be fine and only result in increased VA use. Glibc made same change, increasing the allowed length for keys and values in YP to 16M, in 2013. Reviewed by: markj Discussed with: ian Sponsored by: Mellanox Technologies MFC after: 3 weeks Differential revision: https://reviews.freebsd.org/D20900 Notes: svn path=/head/; revision=350957
* Add mkostempsat(3).Mark Johnston2019-07-291-0/+1
| | | | | | | | | | | | | | | This is a variant of mkostemps() which takes a directory descriptor and returns a descriptor for a tempfile relative to that directory. Unlike the other mktemp functions, mkostempsat() can be used in capability mode. Reviewed by: cem Discussed with: brooks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21031 Notes: svn path=/head/; revision=350420
* Add an entry for copy_file_range(2) to unistd.h.Rick Macklem2019-07-251-0/+1
| | | | | | | | | | | copy_file_range(2) is a Linux compatible syscall created by r350315. Reviewed by: kib, asomers Relnotes: yes Differential Revision: https://reviews.freebsd.org/D20584 Notes: svn path=/head/; revision=350318
* Remove NAND and NANDFS supportWarner Losh2019-06-251-17/+3
| | | | | | | | | | | | | | | | | | | | | NANDFS has been broken for years. Remove it. The NAND drivers that remain are for ancient parts that are no longer relevant. They are polled, have terrible performance and just for ancient arm hardware. NAND parts have evolved significantly from this early work and little to none of it would be relevant should someone need to update to support raw nand. This code has been off by default for years and has violated the vnode protocol leading to panics since it was committed. Numerous posts to arch@ and other locations have found no actual users for this software. Relnotes: Yes No Objection From: arch@ Differential Revision: https://reviews.freebsd.org/D20745 Notes: svn path=/head/; revision=349352
* Move/rename the sys/pwm.h header file to dev/pwm/pwmc.h. The file containsIan Lepore2019-06-151-2/+2
| | | | | | | | | ioctl definitions and related datatypes that allow userland control of pwm hardware via the pwmc device. The new name and location better reflects its assocation with a single device driver. Notes: svn path=/head/; revision=349074
* Move to using newvers -c instead of VARS_ONLY=1Warner Losh2019-05-231-2/+2
| | | | | | | | | | Use newvers.sh -c to get the copyright, and newvers.sh -V RELDATE to get the release date. Differential Revision: https://reviews.freebsd.org/D19849 Notes: svn path=/head/; revision=348178
* Introduce funlinkat syscall that always us to check if we are removingMariusz Zaborski2019-04-061-0/+1
| | | | | | | | | | | | the file associated with the given file descriptor. Reviewed by: kib, asomers Reviewed by: cem, jilles, brooks (they reviewed previous version) Discussed with: pjd, and many others Differential Revision: https://reviews.freebsd.org/D14567 Notes: svn path=/head/; revision=345982
* Add verifying manifest loader for mac_veriexecSimon J. Gerraty2019-02-261-3/+12
| | | | | | | | | | | This tool will verify a signed manifest and load contents into mac_veriexec for storage Sponsored by: Juniper Networks Differential Revision: D16575 Notes: svn path=/head/; revision=344567
* Use a private definition of osockaddr rather then relying on typeBrooks Davis2019-01-181-3/+12
| | | | | | | | | | | | namespace polution in sys/socket.h. Also remove support for operation on 4.3BSD. PR: 224529 Differential Revision: https://reviews.freebsd.org/D14505 Notes: svn path=/head/; revision=343161
* Revert r343093 until I can address the issues raised by kib@.Dag-Erling Smørgrav2019-01-171-1/+0
| | | | Notes: svn path=/head/; revision=343116
* Implement dlopenat(3).Dag-Erling Smørgrav2019-01-161-0/+1
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=343093
* Fix mismatch from r342379.Pedro F. Giffuni2018-12-231-1/+1
| | | | Notes: svn path=/head/; revision=342383
* gai_strerror() - Update string error messages according to RFC 3493.Pedro F. Giffuni2018-12-231-9/+9
| | | | | | | | | | | | | | | | | | | Error messages in gai_strerror(3) vary largely among OSs. For new software we largely replaced the obsoleted EAI_NONAME and with EAI_NODATA but we never updated the corresponding message to better match the intended use. We also have references to ai_flags and ai_family which are not very descriptive for non-developer end users. Bring new new error messages based on informational RFC 3493, which has obsoleted RFC 2553, and make them consistent among the header adn manpage. MFC after: 1 month Differentical Revision: D18630 Notes: svn path=/head/; revision=342379
* Reduce NL_ARGMAX to 4096 to match Linux.Brooks Davis2018-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | NL_ARGMAX is the maximum number of positional arguments supported by printf(3). Prior to r308145 it was declared as 99 and not enforced. r308145 added enforcement and increased the value to 64k. Unfortunately, development versions of PostgreSQL used the system definition to allocate and zero an NL_ARGMAX * 4 sized array on the stack of its snprintf implementation with measurable performance impacts. This has been fixed in new PostgreSQL versions, but it is possible that other programs suffer from this problem. A value of 4096 puts us on par with Linux and is certainly large enough for any reasonable program. Reviewed by: mjg Reported by: mjg Approved by: re (gjb) Differential revision: https://reviews.freebsd.org/D17387 Differential revision: https://reviews.freebsd.org/D8286 Notes: svn path=/head/; revision=339184
* Fix C11 and POSIX 1003.1b-1993 compliance in time.hBrooks Davis2018-09-181-0/+4
| | | | | | | | | | | | | Only expose timespec_get in C11, C++17, or BSD code. Always define struct timespect if defining timespec_get. PR: 231425 Reviewed by: kib Approved by: re (gjb) Differential Revision: https://reviews.freebsd.org/D17174 Notes: svn path=/head/; revision=338751
* Remove arc4random_stir and arc4random_addrandom from stdlib.h.Xin LI2018-08-261-6/+0
| | | | | | | | | | | | Users of arc4random(3) should never call them directly. All ports tree usage was fixed as part of bug 230756. Relnotes: yes Approved by: re (marius), exp-run (bug 230756 by portmgr antoine) Notes: svn path=/head/; revision=338331
* Handle -DNO_ROOT for `make compat` in include/Alex Richardson2018-08-231-1/+1
| | | | | | | | | | Otherwise this step will fail on a Linux host due to missing "wheel" group Approved By: brooks (mentor) Differential Revision: https://reviews.freebsd.org/D16841 Notes: svn path=/head/; revision=338266
* Update userland arc4random() with OpenBSD's Chacha20 based arc4random().Xin LI2018-08-191-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ObsoleteFiles.inc: Remove manual pages for arc4random_addrandom(3) and arc4random_stir(3). contrib/ntp/lib/isc/random.c: contrib/ntp/sntp/libevent/evutil_rand.c: Eliminate in-tree usage of arc4random_addrandom(). crypto/heimdal/lib/roken/rand.c: crypto/openssh/config.h: Eliminate in-tree usage of arc4random_stir(). include/stdlib.h: Remove arc4random_stir() and arc4random_addrandom() prototypes, provide temporary shims for transistion period. lib/libc/gen/Makefile.inc: Hook arc4random-compat.c to build, add hint for Chacha20 source for kernel, and remove arc4random_addrandom(3) and arc4random_stir(3) links. lib/libc/gen/arc4random.c: Adopt OpenBSD arc4random.c,v 1.54 with bare minimum changes, use the sys/crypto/chacha20 implementation of keystream. lib/libc/gen/Symbol.map: Remove arc4random_stir and arc4random_addrandom interfaces. lib/libc/gen/arc4random.h: Adopt OpenBSD arc4random.h,v 1.4 but provide _ARC4_LOCK of our own. lib/libc/gen/arc4random.3: Adopt OpenBSD arc4random.3,v 1.35 but keep FreeBSD r114444 and r118247. lib/libc/gen/arc4random-compat.c: Compatibility shims for arc4random_stir and arc4random_addrandom functions to preserve ABI. Log once when called but do nothing otherwise. lib/libc/gen/getentropy.c: lib/libc/include/libc_private.h: Fold __arc4_sysctl into getentropy.c (renamed to arnd_sysctl). Remove from libc_private.h as a result. sys/crypto/chacha20/chacha.c: sys/crypto/chacha20/chacha.h: Make it possible to use the kernel implementation in libc. PR: 182610 Reviewed by: cem, markm Obtained from: OpenBSD Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16760 Notes: svn path=/head/; revision=338059
* POSIX compliance improvements in the pthread(3) functions.Pedro F. Giffuni2018-08-181-37/+54
| | | | | | | | | | | | | | | | This basically adds makes use of the C99 restrict keyword, and also adds some 'const's to four threading functions: pthread_mutexattr_gettype(), pthread_mutexattr_getprioceiling(), pthread_mutexattr_getprotocol(), and pthread_mutex_getprioceiling. The changes are in accordance to POSIX/SUSv4-2018. Hinted by: DragonFlyBSD Relnotes: yes MFC after: 1 month Differential Revision: D16722 Notes: svn path=/head/; revision=337992
* Add pthread_get_name_np(3).Konstantin Belousov2018-08-171-0/+1
| | | | | | | | | | | | | | | | The function retrieves the thread name previously set by pthread_set_name_np(3). The name is cached in the process memory. Requested by: Willem Jan Withagen <wjw@digiware.nl> Man page update: Yuri Pankov <yuripv@yuripv.net> Reviewed by: ian (previous version) Discussed with: arichardson, bjk (man page) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D16702 Notes: svn path=/head/; revision=337983
* Reorder alphabetically.Konstantin Belousov2018-08-171-3/+3
| | | | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D16702 Notes: svn path=/head/; revision=337981
* Install symlink for sys/nvpair.h in include/Makefile symlinks targetKyle Evans2018-08-131-0/+5
| | | | | | | | | Noticed while fixing the install/sysroot situation for libnvpair and libzfs_core- if one uses the symlinks target, libzfs_core.h is not installed. Notes: svn path=/head/; revision=337700
* Use INCS for non-sys/ libnvpair and libzfs_core includesKyle Evans2018-08-131-6/+0
| | | | | | | | | | | | | | | | | | While nothing was wrong with libnvpair.h, libzfs_core.h was only guarded by MK_CDDL rather than MK_CDDL && MK_ZFS. Rather than ugl'if'ying include/Makefile to impose the extra restriction, just move the non-sys/ includes into INCS with the respect lib builds. This has the added bonus of allowing third party packagers to try and split these libs out of the FreeBSD-runtime package, if they are so inclined. The sys/ include was left alone- generally userland libraries shouldn't install kernel headers. MFC after: 1 week Notes: svn path=/head/; revision=337696
* Bring in timespce_get form NetBSD.Warner Losh2018-08-101-0/+5
| | | | | | | | | | | | | | Bring in the functionality for timespec_get from NetBSD. I've lightly edited the .c file to remove _DIAGASSERT because FreeBSD doesn't have that functionality and the typical #define'ing it to assert isn't right here. The man page is verbatim from NetBSD, but will be revised as part of a larger cleanup of the time man pages (they are inconsistent and vague in all the wrong places). Differential Review: https://reviews.freebsd.org/D16649 Notes: svn path=/head/; revision=337576
* msun: add ld80/ld128 powl, cpow, cpowf, cpowl from openbsdMatt Macy2018-07-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | This corresponds to the latest status (hasn't changed in 9+ years) from openbsd of ld80/ld128 powl, and source cpowf, cpow, cpowl (the complex power functions for float complex, double complex, and long double complex) which are required for C99 compliance and were missing from FreeBSD. Also required for some numerical codes using complex numbered Hamiltonians. Thanks to jhb for tracking down the issue with making weak_reference compile on powerpc. When asked to review, bde said "I don't like it" - but provided no actionable feedback or superior implementations. Discussed with: jhb Submitted by: jmd Differential Revision: https://reviews.freebsd.org/D15919 Notes: svn path=/head/; revision=336299
* Add a missed chunk r335939.Konstantin Belousov2018-07-081-0/+1
| | | | | | | | | Noted by: David Carlier MFC after: 9 days Differential revision: https://reviews.freebsd.org/D16178 Notes: svn path=/head/; revision=336088
* This exposes ZFS user and group quotas via the normalSean Eric Fagan2018-07-051-6/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | quatactl(2) mechanism. (Read-only at this point, however.) In particular, this is to allow rpc.rquotad query quotas for NFS mounts, allowing users to see their quotas on the hosts using the datasets. The changes specifically: * Add new RPC entry points for querying quotas. * Changes the library routines to allow non-UFS quotas. * Changes rquotad to check for quotas on mounted filesystems, rather than being limited to entries in /etc/fstab * Lastly, adds a VFS entry-point for ZFS to query quotas. Note that this makes one unavoidable behavioural change: if quotas are enabled, then they can be queried, as opposed to the current method of checking for quotas being specified in fstab. (With ZFS, if there are user or group quotas, they're used, always.) Reviewed by: delphij, mav Approved by: mav Sponsored by: iXsystems Inc Differential Revision: https://reviews.freebsd.org/D15886 Notes: svn path=/head/; revision=336017
* Add time2posix and posix2time to time.hEitan Adler2018-05-251-0/+2
| | | | | | | | | | | These are documented in `time2posix.3` but the symbols are not actually visible. Since these are not POSIX hide them behind _BSD_VISIBLE. Reviewed by: wollman Differential Revision: https://reviews.freebsd.org/D15530 Notes: svn path=/head/; revision=334207
* Add implementations for clog(3), clogf(3), and clog(3).Konstantin Belousov2018-05-131-0/+4
| | | | | | | | | PR: 216863 Submitted by: bde, Steven G. Kargl <sgk@troutmask.apl.washington.edu> MFC after: 2 weeks Notes: svn path=/head/; revision=333577
* Import the netdump client code.Mark Johnston2018-05-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This is a component of a system which lets the kernel dump core to a remote host after a panic, rather than to a local storage device. The server component is available in the ports tree. netdump is particularly useful on diskless systems. The netdump(4) man page contains some details describing the protocol. Support for configuring netdump will be added to dumpon(8) in a future commit. To use netdump, the kernel must have been compiled with the NETDUMP option. The initial revision of netdump was written by Darrell Anderson and was integrated into Sandvine's OS, from which this version was derived. Reviewed by: bdrewery, cem (earlier versions), julian, sbruno MFC after: 1 month X-MFC note: use a spare field in struct ifnet Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D15253 Notes: svn path=/head/; revision=333283
* Retire lmc(4)Ed Maste2018-05-011-1/+1
| | | | | | | | | | | | | | This driver supports legacy, 32-bit PCI devices, and had an ambiguous license. Supported devices were already reported to be rare in 2003 (when an earlier version of the driver was removed in r123201). Reviewed by: rgrimes Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D15245 Notes: svn path=/head/; revision=333144
* pthread.h: minor indentation cleanups.Pedro F. Giffuni2018-04-041-29/+17
| | | | | | | | | No functional change. X-MFC with: r331969 Notes: svn path=/head/; revision=332035
* pthread.h: drop nullability attributes.Pedro F. Giffuni2018-04-041-101/+95
| | | | | | | | | | | | | | | These have been found to be practically useless. We were actually following the Android bionic library and had some interest in replicating the same warnings and behaviour but Android has since removed them. We are still keeping some uses of nullability attributes in other headers, somewhat in line with Apple's libc. MFC after: 1 week Hinted by: bionic (git 3f66e74b903905e763e104396aff52a81718cfde) Notes: svn path=/head/; revision=331969
* Remove redundant check.Cy Schubert2018-04-031-1/+1
| | | | | | | | | | Reported by: kib@ MFC after: 2 weeks X-MFC with: r331936 Differential Revision: https://reviews.freebsd.org/D12785 Notes: svn path=/head/; revision=331948
* Include update to stdio.h missed in r331936.Cy Schubert2018-04-031-0/+8
| | | | | | | | | | | | | | In my attempt to limit the commit in r331936 to only the gets_s() commit and not include unrelated patches in my tree, this patch was missed. Reported by: pfg MFC after: 2 weeks X-MFC with: r331936 Differential Revision: https://reviews.freebsd.org/D12785 Notes: svn path=/head/; revision=331943
* Add the "TCP Blackbox Recorder" which we discussed at the developerJonathan T. Looney2018-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | summits at BSDCan and BSDCam in 2017. The TCP Blackbox Recorder allows you to capture events on a TCP connection in a ring buffer. It stores metadata with the event. It optionally stores the TCP header associated with an event (if the event is associated with a packet) and also optionally stores information on the sockets. It supports setting a log ID on a TCP connection and using this to correlate multiple connections that share a common log ID. You can log connections in different modes. If you are doing a coordinated test with a particular connection, you may tell the system to put it in mode 4 (continuous dump). Or, if you just want to monitor for errors, you can put it in mode 1 (ring buffer) and dump all the ring buffers associated with the connection ID when we receive an error signal for that connection ID. You can set a default mode that will be applied to a particular ratio of incoming connections. You can also manually set a mode using a socket option. This commit includes only basic probes. rrs@ has added quite an abundance of probes in his TCP development work. He plans to commit those soon. There are user-space programs which we plan to commit as ports. These read the data from the log device and output pcapng files, and then let you analyze the data (and metadata) in the pcapng files. Reviewed by: gnn (previous version) Obtained from: Netflix, Inc. Relnotes: yes Differential Revision: https://reviews.freebsd.org/D11085 Notes: svn path=/head/; revision=331347
* Implement getrandom(2) and getentropy(3)Conrad Meyer2018-03-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The general idea here is to provide userspace programs with well-defined sources of entropy, in a fashion that doesn't require opening a new file descriptor (ulimits) or accessing paths (/dev/urandom may be restricted by chroot or capsicum). getrandom(2) is the more general API, and comes from the Linux world. Since our urandom and random devices are identical, the GRND_RANDOM flag is ignored. getentropy(3) is added as a compatibility shim for the OpenBSD API. truss(1) support is included. Tests for both system calls are provided. Coverage is believed to be at least as comprehensive as LTP getrandom(2) test coverage. Additionally, instructions for running the LTP tests directly against FreeBSD are provided in the "Test Plan" section of the Differential revision linked below. (They pass, of course.) PR: 194204 Reported by: David CARLIER <david.carlier AT hardenedbsd.org> Discussed with: cperciva, delphij, jhb, markj Relnotes: maybe Differential Revision: https://reviews.freebsd.org/D14500 Notes: svn path=/head/; revision=331279
* Add kernel and userspace code to dump the firmware state of supportedHans Petter Selasky2018-03-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | ConnectX-4/5 devices in mlx5core. The dump is obtained by reading a predefined register map from the non-destructive crspace, accessible by the vendor-specific PCIe capability (VSC). The dump is stored in preallocated kernel memory and managed by the mlx5tool(8), which communicates with the driver using a character device node. The utility allows to store the dump in format <address> <value> into a file, to reset the dump content, and to manually initiate the dump. A call to mlx5_fwdump() should be added at the places where a dump must be fetched automatically. The most likely place is right before a firmware reset request. Submitted by: kib@ MFC after: 1 week Sponsored by: Mellanox Technologies Notes: svn path=/head/; revision=330653
* Improve missing tty handling in init(8). This removes a check that didEdward Tomasz Napierala2018-02-271-0/+2
| | | | | | | | | | | | | | | | | | | nothing - it was checking for ENXIO, which, with devfs, is no longer returned - and was badly placed anyway, and replaces it with similar one that works, and is done just before starting getty, instead of being done when rereading ttys(5). From the practical point of view, this makes init(8) handle disappearing terminals (eg /dev/ttyU*) gracefully, without unneccessary getty restarts and resulting error messages. Reviewed by: imp@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D14307 Notes: svn path=/head/; revision=330054
* Do not include float interfaces when using libsa.Warner Losh2018-02-231-0/+2
| | | | | | | | | | We don't support float in the boot loaders, so don't include interfaces for float or double in systems headers. In addition, take the unusual step of spiking double and float to prevent any more accidental seepage. Notes: svn path=/head/; revision=329859
* We don't support gcc < 4.2.1, so varargs.h now is just #errorWarner Losh2018-02-121-9/+1
| | | | | | | | | | | always. Unifdef for versions prior to 4.2.1 and remove now-unused header files. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D14323 Notes: svn path=/head/; revision=329164
* Avoid implicit gcc nonnull attribute in vwarnx().Pedro F. Giffuni2018-01-281-1/+1
| | | | | | | | | | | | | | We removed the nonnull attributes from our headers long ago, but still __printflike() includes it implicitly. This will cause the NULL check to be optimized away in higher -O levels and it will also trigger a -Wnonnull-compare warning. Avoid warning with it in vwarnx(). Obtained from: DragonfLyBSD (git 6329e2f68af73662a1960240675e796ab586bcb1) Notes: svn path=/head/; revision=328517
* Use the __alloc_size2 attribute where relevant.Pedro F. Giffuni2018-01-221-3/+3
| | | | | | | | | | | | | This follows the documented use in GCC. It is basically only relevant for calloc(3), reallocarray(3) and mallocarray(9). Suggested by: Mark Millard Reference: https://docs.freebsd.org/cgi/mid.cgi?9DE674C6-EAA3-4E8A-906F-446E74D82FC4 Notes: svn path=/head/; revision=328237
* Use the __result_use_check attribute also for reallocf(3).Pedro F. Giffuni2018-01-091-1/+1
| | | | | | | | | | | | The GCC attribute causes a warning to be emitted if a caller of the function with this attribute does not use its return value. Unlike the traditional realloc, with reallocf(3) we don't have to check for NULL values but we still have to make sure the result is used. MFC after: 3 days Notes: svn path=/head/; revision=327751
* Introduce the daemonfd function.Mariusz Zaborski2017-12-231-0/+1
| | | | | | | | | | | | | | | | The daemonfd function is equivalent to the daemon(3) function expect that arguments are descriptors. For example dhclient(8) which is sandboxed is unable to open /dev/null to close stdio instead it's allows to fail daemon(3) function to close the descriptors and then do it explicit in code. Instead of such hacks we can use now daemonfd. This API can be also helpful to migrate system to platforms like CheriBSD. Reviewed by: brooks@, bcr@, jilles@ (earlier version) Differential Revision: https://reviews.freebsd.org/D13433 Notes: svn path=/head/; revision=327115
* SPDX: mostly fixes to previous changes.Pedro F. Giffuni2017-12-131-1/+3
| | | | | | | | Introduce the recently approved BSD-1-Clause and replace 0BSD which never did fit well our use cases. Notes: svn path=/head/; revision=326823
* Remove basename_r(3).Ed Schouten2017-12-081-1/+0
| | | | | | | | | | | | | | | | | | Now that the POSIX working group is going to require that basename(3) and dirname(3) are thread-safe in future revisions of the standard, there is even less of a need to provide basename_r(3). Remove this function to prevent people from writing code that only builds on FreeBSD and Bionic. Removing this function seems to break exactly one port: sbruno@'s qemu-user-static. I will send him a pull request on GitHub in a bit. __FreeBSD_version will not be bumped, as any value from 2017 can be used to test for the presence of a thread-safe basename(3)/dirname(3). PR: https://bugs.freebsd.org/224016 Notes: svn path=/head/; revision=326719