aboutsummaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* o Fix invalid TCP checksums with pf(4). [EN-16:02.pf]Gleb Smirnoff2016-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | o Fix YP/NIS client library critical bug. [EN-16:03.yplib] o Fix SCTP ICMPv6 error message vulnerability. [SA-16:01.sctp] o Fix ntp panic threshold bypass vulnerability. [SA-16:02.ntp] o Fix Linux compatibility layer incorrect futex handling. [SA-16:03.linux] o Fix Linux compatibility layer setgroups(2) system call. [SA-16:04.linux] o Fix TCP MD5 signature denial of service. [SA-16:05.tcp] o Fix insecure default bsnmpd.conf permissions. [SA-16:06.bsnmpd] Errata: FreeBSD-EN-16:02.pf Errata: FreeBSD-EN-16:03.yplib Security: FreeBSD-SA-16:01.sctp, CVE-2016-1879 Security: FreeBSD-SA-16:02.ntp, CVE-2015-5300 Security: FreeBSD-SA-16:03.linux, CVE-2016-1880 Security: FreeBSD-SA-16:04.linux, CVE-2016-1881 Security: FreeBSD-SA-16:05.tcp, CVE-2016-1882 Security: FreeBSD-SA-16:06.bsnmpd, CVE-2015-5677 Approved by: so Notes: svn path=/releng/9.3/; revision=293896
* Upgrade NTP to 4.2.8p4.Gleb Smirnoff2015-10-263-2/+87
| | | | | | | | | | | | | | | | | | | | | Security: FreeBSD-SA-15:25.ntp Security: CVE-2015-7871 Security: CVE-2015-7855 Security: CVE-2015-7854 Security: CVE-2015-7853 Security: CVE-2015-7852 Security: CVE-2015-7851 Security: CVE-2015-7850 Security: CVE-2015-7849 Security: CVE-2015-7848 Security: CVE-2015-7701 Security: CVE-2015-7703 Security: CVE-2015-7704, CVE-2015-7705 Security: CVE-2015-7691, CVE-2015-7692, CVE-2015-7702 Approved by: so Notes: svn path=/releng/9.3/; revision=290001
* MFC r260913,266895:Nathan Whitehorn2014-06-081-0/+1
| | | | | | | | | | | | | | | Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the device is an active kernel console and "off" otherwise. This is designed to allow serial-booting x86 systems to provide a login prompt on the serial line by default without providing one on all systems by default. Set this flag on x86 systems for ttyu0. Comments and suggestions by: grehan, dteske, jilles Approved by: re (gjb) Relnotes: yes Notes: svn path=/stable/9/; revision=267243
* MFC r263998:Tijl Coosemans2014-04-155-5/+5
| | | | | | | | Rename __wchar_t so it no longer conflicts with __wchar_t from clang 3.4 -fms-extensions. Notes: svn path=/stable/9/; revision=264495
* MFC r258578, r258580, r258581 (by hrs):Alexander Motin2014-01-2324-641/+596
| | | | | | | | Replace Sun RPC license in TI-RPC library with a 3-clause BSD license with the explicit permissions. Notes: svn path=/stable/9/; revision=261057
* MFC r256925:Tijl Coosemans2013-10-251-0/+1
| | | | | | | | | | | | | Add a dummy statement to the beginning of the pthread_cleanup_pop() macro to allow a call of the macro to be labelled as in: label: pthread_cleanup_pop(); Reviewed by: imp Notes: svn path=/stable/9/; revision=257112
* MFC r255775 r255796 r255807 r255930 r255929 r255957:Ian Lepore2013-10-122-13/+64
| | | | | | | | | | | | | | | Create a separate script to generate osreldate.h rather than sourcing newvers.sh into a temporary subshell with inline make rules. Fixes PR 160646. Allow the path to the system source directory to be passed in to newvers.sh. Pass it in from include/Makefile. If it isn't passed in, fall back to the old logic of using dirname $0. Fixes PR 174422. PR: 160646 174422 Notes: svn path=/stable/9/; revision=256386
* MFC r245428:Dimitry Andric2013-09-061-0/+1
| | | | | | | | | | | | Add CLOCK_PROCESS_CPUTIME_ID to <time.h>, to synchronize the CLOCK_* values with those in <sys/time.h>. Otherwise, if a program includes <time.h> before <sys/time.h>, the CLOCK_PROCESS_CPUTIME_ID macro never gets defined. Reviewed by: davidxu Notes: svn path=/stable/9/; revision=255306
* MFC r254465: Correct implementation of atomic_flag_test_and_setEd Maste2013-08-241-1/+1
| | | | | | | | (This is a direct commit to stable/9 as atomic_flag_test_and_set_explicit is an inline function on HEAD and in a different file.) Notes: svn path=/stable/9/; revision=254783
* MFC r241077:Tijl Coosemans2013-08-211-26/+13
| | | | | | | | | | | | | | | | | | | - Simplify the implementation of atomic_compare_exchange_strong_explicit. - Evaluate the memory order argument in atomic_fetch_*_explicit macros. - Implement atomic_store_explicit using atomic_exchange_explicit instead of a plain assignment. MFC r241190: Define clang feature test macro __has_extension. It's used in stdatomic.h. MFC r254497: Change the return type of the fallback implementation of the atomic_compare_exchange_* macros in stdatomic.h to _Bool. Notes: svn path=/stable/9/; revision=254606
* MFC r251192: Fix misspelling of structure field name.Ed Maste2013-08-191-1/+1
| | | | Notes: svn path=/stable/9/; revision=254513
* MFC r240970:Ed Maste2013-08-181-25/+33
| | | | | | | | | | | | | | | | | | | | - Make C11 atomic macros usable in expressions: - Replace do-while statements with void expressions. - Wrap __asm statements in statement expressions. - Make the macros function-like: - Evaluate all arguments exactly once. - Make sure there's a sequence point between evaluation of the arguments and the function body. Arguments should be evaluated before any memory barriers. - Fix use of __atomic_is_lock_free built-in. It requires the address of an atomic variable as second argument. Use this built-in on clang as well because clang's __c11_atomic_is_lock_free only takes the size of the variable into account. - In atomic_exchange_explicit put the barrier before instead of after the __sync_lock_test_and_set call. Notes: svn path=/stable/9/; revision=254478
* MFC r239960:Ed Maste2013-08-181-1/+1
| | | | | | | | | | | | | | Properly enable Clang-style atomics when available. In addition to testing against cxx_atomic, we must check c_atomic. The former is only set when building C++ code. Also use __has_extension instead of __has_feature. This allows us to use the atomics outside of C11. PR: threads/170073 Notes: svn path=/stable/9/; revision=254477
* MFC r239347, 240295, 240296 and 253325:David Xu2013-08-162-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r239347 | davidxu | 2012-08-17 10:26:31 +0800 (Fri, 17 Aug 2012) | 7 lines Implement syscall clock_getcpuclockid2, so we can get a clock id for process, thread or others we want to support. Use the syscall to implement POSIX API clock_getcpuclock and pthread_getcpuclockid. PR: 168417 ------------------------------------------------------------------------ r240295 | davidxu | 2012-09-10 13:00:29 +0800 (Mon, 10 Sep 2012) | 2 lines Add missing prototype for clock_getcpuclockid. ------------------------------------------------------------------------ r240296 | davidxu | 2012-09-10 13:09:39 +0800 (Mon, 10 Sep 2012) | 2 lines Process CPU-Time Clocks option is supported, define _POSIX_CPUTIME. ------------------------------------------------------------------------ r253325 | kib | 2013-07-14 03:32:50 +0800 (Sun, 14 Jul 2013) | 6 lines Allow to call clock_gettime() on the clock id for zombie process. Reported by: Petr Salinger <Petr.Salinger@seznam.cz> PR: threads/180496 Sponsored by: The FreeBSD Foundation Notes: svn path=/stable/9/; revision=254398
* 1) POSIX requires rand(3) return values to be in the [0, RAND_MAX]Andrey A. Chernov2013-07-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | range, but ACM formula we use have internal state (and return value) in the [1, 0x7ffffffe] range, so our RAND_MAX (0x7fffffff) is never reached because it is off by one, zero is not reached too. Correct both RAND_MAX and rand(3) return value, shifting last one to the 0 by 1 subtracted, resulting POSIXed [0, 0x7ffffffd(=new RAND_MAX)] range. 2) Add a checks for not overflowing on too big seeds. It may happens on the machines, where sizeof(unsigned int) > 32 bits. This change is binary compatible because range is reduced, not expanded, so no bump is needed. Reviewed by: bde Approved by: re (glebius) Notes: svn path=/stable/9/; revision=253607
* MFC 246120,246148,246206,246587,247411,247415:John Baldwin2013-06-282-0/+3
| | | | | | | | | | Add fmemopen(3), open_memstream(3), and open_wmemstream(3) which provide stdio FILE objects for memory buffers. port exprun by: bdrewery Notes: svn path=/stable/9/; revision=252343
* 240618, 240621, 240633, 240671, 240672, 240697, 240700, 241433,Jim Harris2013-06-251-2/+2
| | | | | | | | | | | | | | | 241434, 241657, 241658, 241659, 241660, 241661, 241662, 241663, 241664, 241665, 241689, 242420, 243951, 244410, 244411, 244413, 244549, 245136, 247963, 248729, 248730, 248731, 248732, 248733, 248734, 248735, 248736, 248737, 248738, 248739, 248740, 248741, 248746, 248747, 248748, 248749, 248754, 248755, 248756, 248757, 248758, 248759, 248760, 248761, 248762, 248763, 248764, 248765, 248766, 248767, 248768, 248769, 248770, 248771, 248772, 248773, 248780, 248834, 248835, 248913, 248977, 249067, 249416, 249417, 249418, 249419, 249420, 249421, 249422, 249432 Notes: svn path=/stable/9/; revision=252222
* MFC remainder of r249802 (eadler) to fix build:Glen Barber2013-04-261-1/+1
| | | | | | | | - sl_find does not modify 'name' - make the prototype of sl_find match NetBSD Notes: svn path=/stable/9/; revision=249922
* MFC r245886,245911Brooks Davis2013-03-151-1/+6
| | | | | | | Don't install telnet.h if it will be installed by libtelnet. Notes: svn path=/stable/9/; revision=248357
* MFC 246367:John Baldwin2013-03-011-4/+21
| | | | | | | | Install <dev/agp/agpreg.h> and <dev/pci/pcireg.h> as userland headers in /usr/include. Notes: svn path=/stable/9/; revision=247566
* MFC r243245:Edward Tomasz Napierala2013-02-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add UFS writesuspension mechanism, designed to allow userland processes to modify on-disk metadata for filesystems mounted for write. Reviewed by: kib, mckusick Sponsored by: FreeBSD Foundation MFC r243247: Add change missed in 243245. MFC r243250: Fix build of kdump(1). MFC r243254: Fix build on powerpc. Reviewed by: nwhitehorn MFC r243305 by marius: Fix build after r243245. Submitted by: trasz MFC r243339 by kib: Fix module build after r243245. Notes: svn path=/stable/9/; revision=246234
* MFC r244401,245305,245308:Brooks Davis2013-01-142-92/+4
| | | | | | | | | | | | | Replace our implementation of the vis(3) and unvis(3) APIs with NetBSD's. This output size limited versions of vis and unvis functions as well as a set of vis variants that allow arbitrary characters to be specified for encoding. Finally, MIME Quoted-Printable encoding as described in RFC 2045 is supported. Notes: svn path=/stable/9/; revision=245439
* MFC r241731:Brooks Davis2013-01-102-0/+8
| | | | | | | | | | | | | | Replace our version of the pwcache(3) API with NetBSD's implementation. This adds two features: * uid_from_user() and gid_from_group() as the reverse of user_from_uid() and groups_from_gid(). * pwcache_userdb() and pwcache_groupdb() which allow alternative lookup functions to be used. For example lookups from passwd and group databases in a non-standard location. Notes: svn path=/stable/9/; revision=245267
* MFC r229848:Ed Schouten2012-11-221-0/+1
| | | | | | | | | | | | | | | | | Add aligned_alloc(3). The C11 folks reinvented the wheel by introducing an aligned version of malloc(3) called aligned_alloc(3), instead of posix_memalign(3). Instead of returning the allocation by reference, it returns the address, just like malloc(3). I'm MFCing this now, as it seems aligned_alloc(3) is needed to make the new version of libc++ work, which was merged back to FreeBSD 9 in r243376. Requested by: dim Notes: svn path=/stable/9/; revision=243405
* MFC r243032:Dmitry Sivachenko2012-11-201-1/+1
| | | | | | | | | Use defined() to test macro definitions. Approved by: theraven Notes: svn path=/stable/9/; revision=243331
* MFC r241141, r241165, r241165, r241181;Pedro F. Giffuni2012-10-072-8/+7
| | | | | | | | | | | | | rpc: convert all uid and gid variables to u_int. Follow a similar change in Solaris and linux where the uid and gid variables were made more similar to what the system expects. In our case we use u_int which is what XDR can manage, Reviewed by: bde Notes: svn path=/stable/9/; revision=241309
* MFC r241007, r241008:Pedro F. Giffuni2012-09-302-7/+8
| | | | | | | | | | | | Complete revert of r239963 (from head). The attempt to merge changes from the linux libtirpc caused rpc.lockd to exit after startup under unclear conditions. Reported by: David Wolfskill Notes: svn path=/stable/9/; revision=241059
* MFC r239963:Pedro F. Giffuni2012-09-222-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring some changes from Bull's NFSv4 libtirpc implementation. ____ Fixed infinite loop in svc_run() ____ __rpc_taddr2uaddr_af() assumes the netbuf to always have a non-zero data. This is a bad assumption and can lead to a seg-fault. This patch adds a check for zero length and returns NULL when found. ____ Changed clnt_spcreateerror() to return clearer and more concise error messages. ____ Converted all uid and gid variables of the type uid_t and gid_t. ____ libtirpc: set r_netid and r_owner in __rpcb_findaddr_timed These fields in the rpcbind GETADDR call are being passed uninitialized to CLNT_CALL. In the case of x86_64 at least, this usually leads to a segfault. On x86, it sometimes causes segfaults and other times causes garbage to be sent on the wire. rpcbind generally ignores the r_owner field for calls that come in over the wire, so it really doesn't matter what we send in that slot. We just need to send something. The reference implementation from Sun seems to send a blank string. Have ours follow suit. ____ libtirpc: be sure to free cl_netid and cl_tp When creating a client with clnt_tli_create, it uses strdup to copy strings for these fields if nconf is passed in. clnt_dg_destroy frees these strings already. Make sure clnt_vc_destroy frees them in the same way. ____ Obtained from: Bull GNU/Linux NFSv4 Project Notes: svn path=/stable/9/; revision=240799
* MFC r240060, r240062:Pedro F. Giffuni2012-09-161-10/+10
| | | | | | | | | | Rename __rpc_xdr with XDR. This fixes at least one C++ application and matches what upstream (Solaris) has done on their xdr.h header. PR: 137443 Notes: svn path=/stable/9/; revision=240542
* MFH r236751: document sha256 / sha512 supportDag-Erling Smørgrav2012-07-151-1/+0
| | | | | | | | | | | MFH r236892: remove mention of auth.conf from programs that don't use it MFH r236963: remove dead code relating to auth.conf MFH r236965 r236966 r236967 r237005 r237006 r237011: retire auth.conf Approved by: re Notes: svn path=/stable/9/; revision=238481
* MFC: r237279: install filemon.h into /usr/include for userland consumption.David E. O'Brien2012-07-021-1/+1
| | | | Notes: svn path=/stable/9/; revision=237968
* MFC r228862, 228880, 228882, 228906, 228977, 229332, 229575, 229591, 229704,David Chisnall2012-05-302-45/+419
| | | | | | | | | | | 229716, 230062, 230225, 230267, 234958 This brings stdatomic.h into -STABLE and includes improvements to tgmath.h that significantly decrease compile times on a C11 compiler (such as the clang in the base system). Notes: svn path=/stable/9/; revision=236326
* Merge quick_exit and changes required for C++11 code to compile against ↵David Chisnall2012-05-223-5/+17
| | | | | | | | | | | FreeBSD headers. Merges changes from: r227472 r227475 r227475 r227476 r227476 r227490 r227490 r228322 r228323 r228329 r228330 r228528 r228529 r228529 r228901 r228918 r228918 r232971 r232971 Also bump __FreeBSD_version for this and the xlocale merge. Notes: svn path=/stable/9/; revision=235786
* MFC the xlocale implementation.David Chisnall2012-05-2225-27/+954
| | | | | | | | | | Merged revisions: 227487,227753,227807,227818,227999,228002,228875,230156,231673,232498,232601,232620,232626,232926-232927,232929,232931,232935,233173,233600,234573,234578,235239 This currently defines __NO_TLS on ARM (unlike head), because the required support function has not been MFC'd. Notes: svn path=/stable/9/; revision=235785
* MFC r234785:Dimitry Andric2012-05-172-4/+4
| | | | | | | | | Add a convenience macro for the returns_twice attribute, and apply it to the prototypes of the appropriate functions (getcontext, savectx, setjmp, sigsetjmp and vfork). Notes: svn path=/stable/9/; revision=235539
* MFC r228924:Xin LI2012-02-281-1/+1
| | | | | | | | | | | | | In POSIX.1-2008: P_tmpdir [OB XSI] Default directory prefix for tempnam(). This macro is used in a lot of places in legacy applications, and is why we see a lot of programs written for e.g. Linux store volatile temporary files in /var/tmp and not /tmp. Notes: svn path=/stable/9/; revision=232277
* MFC r231118:Dimitry Andric2012-02-142-2/+2
| | | | | | | | Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp. Notes: svn path=/stable/9/; revision=231702
* MFC r229590 manually:Ed Schouten2012-02-091-1/+1
| | | | | | | | | | | | | | | It turns out our GCC has quite an interesting bug: typeof(1.0fi) != float _Complex typeof((float _Complex)1.0fi) != float _Complex typeof((float _Complex)1.0i) == float _Complex In other words: if casting to an equal size, GCC seems to take a shortcut. By casting down from a double to a float, GCC doesn't take this shortcut, yielding the proper type. Notes: svn path=/stable/9/; revision=231282
* MFC r229768:Konstantin Belousov2012-01-211-0/+1
| | | | | | | | Implement fdlopen(3), an rtld interface to load shared object by file descriptor. Notes: svn path=/stable/9/; revision=230410
* MFC r228754:Eitan Adler2012-01-081-1/+2
| | | | | | | | | | - Add restrict keyword to glob(3) PR: kern/161958 Approved by: jilles Notes: svn path=/stable/9/; revision=229823
* MFC r228444:Matthew D Fleming2012-01-021-0/+2
| | | | | | | | | | | | | | | | | | | - Define true and false in sys/types.h for _KERNEL consumers, and typedef bool. Due to macro expansion it seemed better to use a typedef for kernel consumers (specifically ofed won't compile without more changes if a define is used). - <stdbool.h> should also not re-define bool/true/false if they are defined by <sys/types.h>. It would probably be a programming error to define _KERNEL for user-space code, but downstream consumers like Isilon have already been including <stdbool.h> in kernel sources, and this protects that usage. - sizeof(_Bool) is not necessarily the same as sizeof(int), so kernel modules should be rebuilt with this change. Bump __FreeBSD_version. No KBI change is expected based on review of the code. Notes: svn path=/stable/9/; revision=229285
* Fix a problem whereby a corrupt DNS record can cause named to crash. [11:06]Colin Percival2011-12-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | Add an API for alerting internal libc routines to the presence of "unsafe" paths post-chroot, and use it in ftpd. [11:07] Fix a buffer overflow in telnetd. [11:08] Make pam_ssh ignore unpassphrased keys unless the "nullok" option is specified. [11:09] Add sanity checking of service names in pam_start. [11:10] Approved by: so (cperciva) Approved by: re (bz) Security: FreeBSD-SA-11:06.bind Security: FreeBSD-SA-11:07.chroot Security: FreeBSD-SA-11:08.telnetd Security: FreeBSD-SA-11:09.pam_ssh Security: FreeBSD-SA-11:10.pam Notes: svn path=/stable/9/; revision=228843
* MFC: r226035Jung-uk Kim2011-10-051-0/+4
| | | | | | | | | Avoid accidental conflicts with C++ operator keywords. Approved by: re (kib) Notes: svn path=/stable/9/; revision=226036
* MFC r225790:Konstantin Belousov2011-10-041-1/+1
| | | | | | | | | | Install ciss(4) ioctl header. PR: kern/109813 Approved by: re (bz) Notes: svn path=/stable/9/; revision=225967
* Revert the previous change and add xdr_sizeofKevin Lo2011-07-101-39/+37
| | | | | | | Requested by: bde Notes: svn path=/head/; revision=223906
* - Add xdr_sizeof(3) to libcKevin Lo2011-07-091-37/+40
| | | | | | | | | - Document xdr_sizeof(3); from NetBSD Discussed with: kib Notes: svn path=/head/; revision=223877
* * Add the readline(3) API to libedit. The libedit versions ofDavid E. O'Brien2011-04-052-230/+1
| | | | | | | | | | | | | | | | | | | {readline,history}.h are in /usr/include/edit so as to not conflict with the GNU libreadline versions. To use the libedit readline(3) one should add "-I/usr/include/edit" to their Makefile (spelled "-I${DESTDIR}/${INCLUDEDIR}/edit" within the FreeBSD source tree). * Enable its use in the BSD licensed utilities that support readline(3). * To make it easier to sync libedit development with NetBSD, histedit.h is moved into libedit's directory as history shows shown we keep merging it into that location. Obtained from: NetBSD Sponsored by: Juniper Networks Notes: svn path=/head/; revision=220370
* MFgraid/head:Alexander Motin2011-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new RAID GEOM class, that is going to replace ataraid(4) in supporting various BIOS-based software RAIDs. Unlike ataraid(4) this implementation does not depend on legacy ata(4) subsystem and can be used with any disk drivers, including new CAM-based ones (ahci(4), siis(4), mvs(4), ata(4) with `options ATA_CAM`). To make code more readable and extensible, this implementation follows modular design, including core part and two sets of modules, implementing support for different metadata formats and RAID levels. Support for such popular metadata formats is now implemented: Intel, JMicron, NVIDIA, Promise (also used by AMD/ATI) and SiliconImage. Such RAID levels are now supported: RAID0, RAID1, RAID1E, RAID10, SINGLE, CONCAT. For any all of these RAID levels and metadata formats this class supports full cycle of volume operations: reading, writing, creation, deletion, disk removal and insertion, rebuilding, dirty shutdown detection and resynchronization, bad sector recovery, faulty disks tracking, hot-spare disks. For Intel and Promise formats there is support multiple volumes per disk set. Look graid(8) manual page for additional details. Co-authored by: imp Sponsored by: Cisco Systems, Inc. and iXsystems, Inc. Notes: svn path=/head/; revision=219974
* Add missing declarations that I intended to commit with r219359.David Schultz2011-03-071-0/+2
| | | | | | | Not sure why we have math.h in lib/msun/ and complex.h in include/. Notes: svn path=/head/; revision=219379
* Include stdio.h, so we can include printf.h in any order, as it needs FILE.Pawel Jakub Dawidek2011-03-061-0/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=219343