aboutsummaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* MFC 246367:John Baldwin2013-03-011-4/+20
| | | | | | | | Install <dev/agp/agpreg.h> and <dev/pci/pcireg.h> as userland headers in /usr/include. Notes: svn path=/stable/8/; revision=247567
* 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/8/; revision=241060
* 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/8/; revision=240800
* 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/8/; revision=240543
* 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/8/; revision=231704
* MFC r228754:Eitan Adler2012-01-081-1/+2
| | | | | | | | | | - Add restrict keyword to glob(3) PR: kern/161958 Approved by: jilles Notes: svn path=/stable/8/; revision=229824
* 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/8/; revision=228843
* MFC: r225801Jung-uk Kim2011-10-051-0/+4
| | | | | | | Avoid accidental conflicts with C++ operator keywords. Notes: svn path=/stable/8/; revision=226037
* MFC r225790:Konstantin Belousov2011-10-041-1/+1
| | | | | | | | | Install ciss(4) ioctl header. PR: kern/109813 Notes: svn path=/stable/8/; revision=225964
* MFC r219974, r220209, r220210, r220790:Alexander Motin2011-06-171-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 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=/stable/8/; revision=223177
* MFC: r220370, r209136, r209219David E. O'Brien2011-04-132-231/+1
| | | | | | | | | | | | | | | | * Add the readline(3) API to libedit. The libedit versions of {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). * histedit.h is moved into libedit's directory * Add basic filename completion code. * Allow simple quoting in filename completion. Notes: svn path=/stable/8/; revision=220612
* MFC r219343:Mikolaj Golub2011-03-291-0/+1
| | | | | | | | | | | r219343 (pjd): Include stdio.h, so we can include printf.h in any order, as it needs FILE. Approved by: kib (co-mentor), pjd (mentor) Notes: svn path=/stable/8/; revision=220140
* MFC r219271: POSIX.1-2008 moved some constants from the XSI option to theJilles Tjoelker2011-03-181-4/+7
| | | | | | | Base. Notes: svn path=/stable/8/; revision=219757
* MFC r219256: Fix some _POSIX minimum/maximum values in limits.h:Jilles Tjoelker2011-03-171-4/+15
| | | | | | | | | | | | | * Some values changed in POSIX.1-2001; provide the former value if a program requests compliance to an earlier version of POSIX. [1] * Add missing _POSIX_CLOCKRES_MIN constant. This is a maximum value but otherwise works the same as the minimum values. PR: standards/104743 Submitted by: bde [1] (not exact #ifdefs, but the values) Notes: svn path=/stable/8/; revision=219726
* MFC r218881:Konstantin Belousov2011-02-271-1/+2
| | | | | | | Add restrict keyword to pthread_sigmask prototype and manpage. Notes: svn path=/stable/8/; revision=219080
* MFC r218772:Konstantin Belousov2011-02-241-1/+1
| | | | | | | Install iodev.h. Notes: svn path=/stable/8/; revision=218990
* MFC r217207:Ed Schouten2011-02-041-1/+1
| | | | | | | | | | | Add missing __dead2 to __assert(). __assert() is called when an assertion fails. After printing an error message, it will call abort(). abort() never returns, hence it has the __dead2 attribute. Also add this attribute to __assert(). Notes: svn path=/stable/8/; revision=218291
* MFC r215236:Xin LI2010-11-271-23/+17
| | | | | | | | | Sync with OpenBSD, primarily better signal and terminal handling. Obtained from: OpenBSD Notes: svn path=/stable/8/; revision=215934
* MFC r213241, r213257:David Xu2010-10-261-1/+1
| | | | | | | | | | | | In current code, statically initialized and destroyed object have same null value, the code can not distinguish between them, to fix the problem, now a destroyed object is assigned to a non-null value, and it will be rejected by some pthread functions. PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP is changed to number 1, so that adaptive mutex can be statically initialized correctly. Notes: svn path=/stable/8/; revision=214371
* MFC r211980: Correct value for _POSIX_AIO_LISTIO_MAX in <limits.h>.Jilles Tjoelker2010-10-091-1/+1
| | | | | | | | | | | All the "Minimum Values" (POSIX.1-2008 XBD 13 Headers <limits.h>) are now correct. These should all be exactly as they are in the specification; the possibly higher values we support are announced differently. PR: standards/104743 Notes: svn path=/stable/8/; revision=213655
* Revert r213002.Rui Paulo2010-09-261-1/+0
| | | | Notes: svn path=/stable/8/; revision=213184
* MFC r197804 (rwatson):Rui Paulo2010-09-221-0/+1
| | | | | | | | | | | | | Add basename_r(3) to complement basename(3). basename_r(3) which accepts a caller-allocated buffer of at least MAXPATHLEN, rather than using a global buffer. Note about semantics: while this interface is not POSIXy, there's another major platform that uses it (Android) and the semantics between the two platforms are pretty much the same. Notes: svn path=/stable/8/; revision=213002
* MFC r209715: addr2ascii(3) was removed ages ago. Fix the comment.Maxim Konovalov2010-07-131-1/+1
| | | | Notes: svn path=/stable/8/; revision=209974
* MFC r206893:Konstantin Belousov2010-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Slightly modernize realpath(3). SUSv4 requires that implementation returns EINVAL if supplied path is NULL, and ENOENT if path is empty string [1]. Bring prototype in conformance with SUSv4, adding restrict keywords. Allow the resolved path buffer pointer be NULL, in which case realpath(3) allocates storage with malloc(). MFC r206898: Free() is not allowed to modify errno, remove safety brackets around it. Add small optimization, do not copy a string to the buffer that is to be freed immediately after. MFC r206997: Move realpath(3) prototype to a POSIX section. MFC r206998: Add standards section, improve wording, taking into account the handling of NULL and changed type in declaration. Notes: svn path=/stable/8/; revision=207599
* MFC r206155, r206267: Add capability to use a db version ofHajimu UMEMOTO2010-04-182-0/+2
| | | | | | | | services. It is enabled by specifying `db' as source of services in /etc/nsswitch.conf. Notes: svn path=/stable/8/; revision=206784
* MFC r205606Pietro Cerutti2010-03-311-2/+1
| | | | | | | | | Remove const'ness from dlerror(3) prototype, for consistency with POSIX. Approved by: cognet Notes: svn path=/stable/8/; revision=205979
* MFC r199827:Konstantin Belousov2010-01-311-0/+5
| | | | | | | | | | Implement sighold, sigignore, sigpause, sigrelse, sigset functions. MFC r200881 (by cognet): Don't name parameters. Notes: svn path=/stable/8/; revision=203298
* Merge scandir(3) interface update to stable/8.Konstantin Belousov2010-01-241-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r201512: Modernize scandir(3) and alphasort(3) interfaces according to the IEEE Std 1003.1-2008. MFC r201602: Move scandir(3) and alphasort(3) into XSI namespace. MFC r201604: Use thunks to adapt alphasort-like interface to the comparision function required by qsort() and qsort_r(). MFC r202556 (by ache): Use strcoll() in opendir() and alphasort(). Remove some comments. MFC r202572 (by ache): Revert to using strcmp() for opendir(). MFC r202677 (by ache): Style. MFC r202679 (by ache): Style: rename internal function to opendir_compar(). MFC r202691 (by ache): For alphasort(3) add reference to strcoll(3). MFC r202693 (by ache): Style: reword comment. Notes: svn path=/stable/8/; revision=202921
* MFCs of r197764, r197765, r197766, r197847:Edwin Groothuis2009-10-311-0/+14
| | | | | | | | | | | Modified locale(1) to be able to show the altmon_X fields and the [cxX]_fmt's. Also modify the "-k list" option to display only fields with a certain prefix. Add the comment "(FreeBSD only)" to the altmonth_x keywords Notes: svn path=/stable/8/; revision=198704
* Merge files missed in r196285. SVN is simply horrible. Sorry for theScott Long2009-08-171-1/+1
| | | | | | | | | tree breakage. Approved by: re Notes: svn path=/stable/8/; revision=196321
* Implement RTLD_NOLOAD flag for dlopen(3).Konstantin Belousov2009-07-171-0/+1
| | | | | | | | | Requested and tested by: jkim Reviewed by: kan Approved by: re (kensmith) Notes: svn path=/head/; revision=195745
* Separate the parallel scsi knowledge out of the core of the XPT, andScott Long2009-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modularize it so that new transports can be created. Add a transport for SATA Add a periph+protocol layer for ATA Add a driver for AHCI-compliant hardware. Add a maxio field to CAM so that drivers can advertise their max I/O capability. Modify various drivers so that they are insulated from the value of MAXPHYS. The new ATA/SATA code supports AHCI-compliant hardware, and will override the classic ATA driver if it is loaded as a module at boot time or compiled into the kernel. The stack now support NCQ (tagged queueing) for increased performance on modern SATA drives. It also supports port multipliers. ATA drives are accessed via 'ada' device nodes. ATAPI drives are accessed via 'cd' device nodes. They can all be enumerated and manipulated via camcontrol, just like SCSI drives. SCSI commands are not translated to their ATA equivalents; ATA native commands are used throughout the entire stack, including camcontrol. See the camcontrol manpage for further details. Testing this code may require that you update your fstab, and possibly modify your BIOS to enable AHCI functionality, if available. This code is very experimental at the moment. The userland ABI/API has changed, so applications will need to be recompiled. It may change further in the near future. The 'ada' device name may also change as more infrastructure is completed in this project. The goal is to eventually put all CAM busses and devices until newbus, allowing for interesting topology and management options. Few functional changes will be seen with existing SCSI/SAS/FC drivers, though the userland ABI has still changed. In the future, transports specific modules for SAS and FC may appear in order to better support the topologies and capabilities of these technologies. The modularization of CAM and the addition of the ATA/SATA modules is meant to break CAM out of the mold of being specific to SCSI, letting it grow to be a framework for arbitrary transports and protocols. It also allows drivers to be written to support discrete hardware without jeopardizing the stability of non-related hardware. While only an AHCI driver is provided now, a Silicon Image driver is also in the works. Drivers for ICH1-4, ICH5-6, PIIX, classic IDE, and any other hardware is possible and encouraged. Help with new transports is also encouraged. Submitted by: scottl, mav Approved by: re Notes: svn path=/head/; revision=195534
* There is an optimization in chmod(1), that makes it not to call chmod(2)Edward Tomasz Napierala2009-07-081-0/+1
| | | | | | | | | | | | | | | | if the new file mode is the same as it was before; however, this optimization must be disabled for filesystems that support NFSv4 ACLs. Chmod uses pathconf(2) to determine whether this is the case - however, pathconf(2) always follows symbolic links, while the 'chmod -h' doesn't. This change adds lpathconf(3) to make it possible to solve that problem in a clean way. Reviewed by: rwatson (earlier version) Approved by: re (kib) Notes: svn path=/head/; revision=195458
* Merge fmtcheck() prototype change.Xin LI2009-06-231-1/+1
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=194801
* Re-do r192913 in less intrusive way. Only do IP_RECVDSTADDR/IP_SENDSRCADDRAlexander Kabaev2009-06-181-0/+1
| | | | | | | | | | | | | | | | dace for UPDv4 sockets bound to INADDR_ANY. Move the code to set IP_RECVDSTADDR/IP_SENDSRCADDR into svc_dg.c, so that both TLI and non-TLI users will be using it. Back out my previous commit to mountd. Turns out the problem was affecting more than one binary so it needs to me addressed in generic rpc code in libc in order to fix them all. Reported by: lstewart Tested by: lstewart Notes: svn path=/head/; revision=194448
* Add a new 'void closefrom(int lowfd)' system call. When called, it closesJohn Baldwin2009-06-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | any open file descriptors >= 'lowfd'. It is largely identical to the same function on other operating systems such as Solaris, DFly, NetBSD, and OpenBSD. One difference from other *BSD is that this closefrom() does not fail with any errors. In practice, while the manpages for NetBSD and OpenBSD claim that they return EINTR, they ignore internal errors from close() and never return EINTR. DFly does return EINTR, but for the common use case (closing fd's prior to execve()), the caller really wants all fd's closed and returning EINTR just forces callers to call closefrom() in a loop until it stops failing. Note that this implementation of closefrom(2) does not make any effort to resolve userland races with open(2) in other threads. As such, it is not multithread safe. Submitted by: rwatson (initial version) Reviewed by: rwatson MFC after: 2 weeks Notes: svn path=/head/; revision=194262
* Delete the old USB stack. The new stack has settled in and has all theAndrew Thompson2009-05-271-1/+1
| | | | | | | drivers/functionality and then some. Notes: svn path=/head/; revision=192901
* Modify src/etc/mtree/BSD.include.dist and src/include/MakefileRick Macklem2009-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | so that the .h files in src/sys/fs/nfs will be installed under /usr/include/fs/nfs. This will allow the following utilities to build, once additions and changes for the experimental nfs subsystem are committed: usr.sbin/mountd - Once modified to add support for the experimental nfs subsystem. ur.sbin/nfsstat - Once modified to add support for the experimental nfs subsystem. usr.sbin/nfscbd - The client side callback daemon for NFSv4. usr.sbin/nfsuserd - The NFSv4 user/group name<->uid/gid mapping daemon. usr.sbin/nfsdumpstate - The NFSv4 utility for dumping open/lock state. usr.sbin/nfsrevoke - The sysadmin command for revoking NFSv4 state. Approved by: kib (mentor) Notes: svn path=/head/; revision=192545
* Revert r190943, since the problem in ports seems to be fixed now.David Schultz2009-04-171-2/+0
| | | | | | | | It's amazing how a well-placed eyesore generates more motivation in a day than email generates in three weeks. Notes: svn path=/head/; revision=191202
* GNU Pth has some fragile kludges that were broken by r189828.David Schultz2009-04-111-0/+2
| | | | | | | | | I've discussed this with the Pth maintainer and no clear solution has emerged on the ports side of things, so for now, hack around the issue in signal.h. Notes: svn path=/head/; revision=190943
* Implement support for RTLD_NODELETE flag for dlopen() and -z nodeleteKonstantin Belousov2009-03-301-0/+1
| | | | | | | | | | static linker option. Do it by incrementing reference count on the loaded object and its dependencies. Reviewed by: davidxu, kan Notes: svn path=/head/; revision=190543
* Minor changes from Berkeley DB 1.86 and further improvements from OpenBSD.Xin LI2009-03-281-15/+23
| | | | | | | | | | | | | This does not include the new hash routines since they will cause problems when reading old hash files. Since mpool(3) has been changed, provide a compatibility shim for older binaries. Obtained from: OpenBSD Notes: svn path=/head/; revision=190498
* Make programs that define a macro called `dprintf' more likely to work.David Schultz2009-03-251-1/+1
| | | | Notes: svn path=/head/; revision=190409
* Fix the visibility of several prototypes. Also move pthread_kill() andDavid Schultz2009-03-142-3/+16
| | | | | | | | | | | | | pthread_sigmask() to signal.h. In principle, this shouldn't break anything, since they're already in signal.h on other systems, and the FreeBSD manpage says that both pthread.h and signal.h need to be included to get these functions. Add a hack to declare pthread_t in the P1003.1-2008 namespace in signal.h. Notes: svn path=/head/; revision=189828
* Hide dbopen() in the POSIX namespace, and use standard type namesDavid Schultz2009-03-141-33/+35
| | | | | | | throughout so that this compiles in strict POSIX mode. Notes: svn path=/head/; revision=189827
* Hide numerous BSD extensions in the POSIX namespace.David Schultz2009-03-141-24/+30
| | | | Notes: svn path=/head/; revision=189826
* Namespace: abort2() is a BSD extension.David Schultz2009-03-141-1/+1
| | | | Notes: svn path=/head/; revision=189820
* Namespace: endpwent, getpwent, and setpwent are XSI extensions.David Schultz2009-03-141-1/+4
| | | | Notes: svn path=/head/; revision=189819
* Namespace: dprintf() and getline() are in P1003.1-2008.David Schultz2009-03-141-2/+2
| | | | Notes: svn path=/head/; revision=189818
* Various namespace cleanups, including exposing fchmod() and fchmodat()David Schultz2009-03-141-5/+4
| | | | | | | | | | in the POSIX namespace, and hiding eaccess() and setproctitle(). Also move mknodat() from unistd.h to sys/stat.h where it belongs. The *at() syscalls are only in CURRENT, so this shouldn't cause problems. Notes: svn path=/head/; revision=189817