summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Rather than replicating the maths from the kernel, use thebz2009-08-131-1/+1
| | | | | | | | | value the kernel calculated directly as we already read it with struct vnet. This will make kvm_vnet.c more resilent in case of possible kernel changes. Reviewed by: rwatson Approved by: re (kib)
* Update posix1e-related man pages, especially as relates to MAC, to morerwatson2009-08-127-156/+129
| | | | | | accurately reflect the last ten years of work. Approved by: re (kib)
* Merge the remainder of kern_vimage.c and vimage.h into vnet.c andrwatson2009-08-011-1/+0
| | | | | | | | | | vnet.h, we now use jails (rather than vimages) as the abstraction for virtualization management, and what remained was specific to virtual network stacks. Minor cleanups are done in the process, and comments updated to reflect these changes. Reviewed by: bz Approved by: re (vimage blanket)
* LibUSB v1.0:alfred2009-07-309-1531/+1356
| | | | | | | | | - Significantly improve libusb10 support. - Many minor issues fixed. - P4 ID: 166189, 165853, 165991, 166052, 166069 Submitted by: hps Approved by: re
* The parser for Rockridge symlinks tended to insertkientzle2009-07-261-8/+8
| | | | | | | | extra slashes at the beginning of absolute targets. Thanks to Jung-uk Kim for pointing this out to me. Approved by: re (kib)
* Eliminate a stale paragraph from the BUGS section. This "bug" wasalc2009-07-261-8/+1
| | | | | | eliminated in r195693. Approved by: re (kensmith)
* Libarchive recognizes hardlinked files on ISO images,kientzle2009-07-251-0/+1
| | | | | | | | | | | but returned them incorrectly, causing tar to actually erase the resulting file while trying to restore the link. This one-line fix corrects the hardlink descriptions to avoid this problem. Thanks to Jung-uk Kim for pointing this out. Approved by: re (kib)
* Some jail parameters (in particular, "ip4" and "ip6" for IP addressjamie2009-07-252-60/+89
| | | | | | | | | restrictions) were found to be inadequately described by a boolean. Define a new parameter type with three values (disable, new, inherit) to handle these and future cases. Approved by: re (kib), bz (mentor) Discussed with: rwatson
* Revert the changes to struct kinfo_proc in r194498. Instead, fillbrooks2009-07-241-2/+8
| | | | | | | | | | in up to 16 (KI_NGROUPS) values and steal a bit from ki_cr_flags (all bits currently unused) to indicate overflow with the new flag KI_CRF_GRP_OVERFLOW. This fixes procstat -s. Approved by: re (kib)
* Make libkvm work on live systems and crashdumps with andbz2009-07-234-9/+412
| | | | | | | | | | | | | | | | | | without VIMAGE virtualization in the kernel. If we cannot resolve a symbol try to see if we can find it with prefix of the virtualized subsystem, currently only "vnet_entry" by identifying either the vnet of the current process for a live system or the vnet of proc0 (or of dumptid if compiled in a non-default way). The way this is done currently allows us to only touch libkvm but no single application. Once we are going to virtualize more subsystems we will have to review this decision for better scaling. Submitted by: rwatson (initial version of kvm_vnet.c, lots of ideas) Reviewed by: rwatson Approved by: re (kib)
* It is believed the last subsystem that limited ID sizes to somethingkensmith2009-07-221-7/+18
| | | | | | | | | | other than the current system-wide size (32-bits) has been updated so for now just cautiously turn the check off. While here fix the check for IDs being too large which doesn't work due to type mis-matches. Reviewed by: jhb (previous version) Approved by: re (kib) MFC after: 1 month (type mis-match fixes only)
* Bump the version of all non-symbol-versioned shared libraries inkensmith2009-07-1941-41/+41
| | | | | | | | preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version. Reviewed by: kib Approved by: re (rwatson)
* Correct AT_SYMLINK_FOLLOW flag name in linkat(2) man page.jilles2009-07-191-1/+1
| | | | Approved by: re (kib), ed (mentor)
* Store accurate offset information in CTF data. A large number ofnp2009-07-171-2/+2
| | | | | | | | | | | | | | | structs had incorrect member offsets, limiting dtrace's usefulness when working with them. An example of incorrect info (struct rtentry) from before this fix: <1738> STRUCT rtentry (200 bytes) rt_nodes type=1731 off=0 rt_gateway type=849 off=65280 <== WRONG, should be 8 * 96 rt_flags type=3 off=65344 <== wrong again, and so on.. ... Approved by: re (kib), gnn (mentor) MFC after: 2 weeks
* Implement RTLD_NOLOAD flag for dlopen(3).kib2009-07-171-1/+8
| | | | | | Requested and tested by: jkim Reviewed by: kan Approved by: re (kensmith)
* Second attempt at eliminating .text relocations in shared librarieskan2009-07-143-8/+2
| | | | | | | | | | | | | | compiled with stack protector. Use libssp_nonshared library to pull __stack_chk_fail_local symbol into each library that needs it instead of pulling it from libc. GCC generates local calls to this function which result in absolute relocations put into position-independent code segment, making dynamic loader do extra work every time given shared library is being relocated and making affected text pages non-shareable. Reviewed by: kib Approved by: re (kib)
* - Change mmap() to fail requests with EINVAL that pass a length of 0. Thisjhb2009-07-141-2/+2
| | | | | | | | | | | | behavior is mandated by POSIX. - Do not fail requests that pass a length greater than SSIZE_MAX (such as > 2GB on 32-bit platforms). The 'len' parameter is actually an unsigned 'size_t' so negative values don't really make sense. Submitted by: Alexander Best alexbestms at math.uni-muenster.de Reviewed by: alc Approved by: re (kib) MFC after: 1 week
* Add missing MLINKS for acl_{get,set}_link_fd(3).trasz2009-07-141-0/+2
| | | | Approved by: re (kib)
* Move msg{snd,recv,get,ctl} manual pages from section 3 to 2.trasz2009-07-137-26/+27
| | | | Approved by: re (kib)
* Fix fwrite() to return 0 when size or nmemb are zero.ed2009-07-122-4/+9
| | | | | | | | Right now nmemb is returned when size is 0. In newer versions of the standards, it is explicitly required that fwrite() should return 0. Submitted by: Christoph Mallon Approved by: re (kib)
* Sync the libusb 1.0 exported api to the latest GSoC code.thompsa2009-07-105-506/+510
| | | | | | | | | | - Fix possible uninitialised variables and null derefs - Support big transfers - Various bug fixes and style changes Submitted by: Sylvestre Gallon Sponsored by: Google Summer of Code 2009 Approved by: re (kib)
* Separate the parallel scsi knowledge out of the core of the XPT, andscottl2009-07-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* There is an optimization in chmod(1), that makes it not to call chmod(2)trasz2009-07-083-3/+27
| | | | | | | | | | | | | 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)
* In the current code, rdlock_count is not correctly handled for some cases.attilio2009-07-062-1/+4
| | | | | | | | | | | | | | | The most notable is that it is not bumped in rwlock_rdlock_common() when the hard path (__thr_rwlock_rdlock()) returns successfully. This can lead to deadlocks in libthr when rwlocks recursion in read mode happens. Fix the interested parts by correctly handling rdlock_count. PR: threads/136345 Reported by: rink Tested by: rink Reviewed by: jeff Approved by: re (kib) MFC: 2 weeks
* - Don't suggest opening file for writing in preparation for fexecve(2).pjd2009-07-051-6/+5
| | | | | | - execve(2)/fexecve(2) won't return ETXTBSY if file is open for reading. Approved by: re (kib)
* Make it clear where to look for for protocol-specific socket options.trasz2009-06-301-0/+9
| | | | | Reviewed by: rwatson Approved by: re (kib)
* Make the structure definitions in the man pages match the real code, andkib2009-06-293-25/+7
| | | | | | remove no longer valid caution. Approved by: re (kensmith)
* Back out previous revision until better tested fix is ready.kan2009-06-293-2/+8
| | | | Approved by: re (impliciti, by approving previos check-in)
* Eliminate .text relocations in shared libraries compiled with stack protector.kan2009-06-283-8/+2
| | | | | | | | | | | | Use libssp_nonshared library to pull __stack_chk_fail_local symbol into each library that needs it instead of pulling it from libc. GCC generates local calls to this function which result in absolute relocations put into position-independent code segment, making dynamic loader do extra work everys time given shared library is being relocated and making affected text pages non-shareable. Reviewed by: kib Approved by: re (kensmith)
* Implement %z for strptime.delphij2009-06-251-0/+28
| | | | | | PR: kern/63064 Submitted by: Stefan `Sec` Zehl <sec 42 org> (with some small changes) MFC after: 1 month
* Fix dynamic (re)allocation logic in jailparam_set and jailparam_get.jamie2009-06-251-34/+72
| | | | | | Touch up jailparam_import a bit while I'm at it. Approved by: bz (mentor)
* Fix acl_set_fd(3) and acl_get_fd(3) for cases where the kernel doesn't knowtrasz2009-06-252-2/+3
| | | | anything about _PC_ACL_NFS4.
* Manual page tweaks.trasz2009-06-251-2/+2
|
* Fix c194955 - somehow I managed all the new files, tripling theirtrasz2009-06-2517-4664/+0
| | | | contents.
* Bump manual page timestamps.trasz2009-06-2519-19/+19
|
* Add NFSv4 ACL support to libc.trasz2009-06-2540-167/+7762
| | | | | | | | | | | This adds the following functions to the acl(3) API: acl_add_flag_np, acl_clear_flags_np, acl_create_entry_np, acl_delete_entry_np, acl_delete_flag_np, acl_get_extended_np, acl_get_flag_np, acl_get_flagset_np, acl_set_extended_np, acl_set_flagset_np, acl_to_text_np, acl_is_trivial_np, acl_strip_np, acl_get_brand_np. Most of them are similar to what Darwin does. There are no backward-incompatible changes. Approved by: rwatson@
* Lock around access to nc_file and netconfig_info ("ni"). The RPCdelphij2009-06-241-3/+49
| | | | | | | | | part of libc is still not thread safe but this would at least reduce the problems we have. PR: threads/118544 Submitted by: Changming Sun <snnn119 gmail com> MFC after: 2 weeks
* Change the ABI of some of the structures used by the SYSV IPC API:jhb2009-06-245-8/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The uid/cuid members of struct ipc_perm are now uid_t instead of unsigned short. - The gid/cgid members of struct ipc_perm are now gid_t instead of unsigned short. - The mode member of struct ipc_perm is now mode_t instead of unsigned short (this is merely a style bug). - The rather dubious padding fields for ABI compat with SV/I386 have been removed from struct msqid_ds and struct semid_ds. - The shm_segsz member of struct shmid_ds is now a size_t instead of an int. This removes the need for the shm_bsegsz member in struct shmid_kernel and should allow for complete support of SYSV SHM regions >= 2GB. - The shm_nattch member of struct shmid_ds is now an int instead of a short. - The shm_internal member of struct shmid_ds is now gone. The internal VM object pointer for SHM regions has been moved into struct shmid_kernel. - The existing __semctl(), msgctl(), and shmctl() system call entries are now marked COMPAT7 and new versions of those system calls which support the new ABI are now present. - The new system calls are assigned to the FBSD-1.1 version in libc. The FBSD-1.0 symbols in libc now refer to the old COMPAT7 system calls. - A simplistic framework for tagging system calls with compatibility symbol versions has been added to libc. Version tags are added to system calls by adding an appropriate __sym_compat() entry to src/lib/libc/incldue/compat.h. [1] PR: kern/16195 kern/113218 bin/129855 Reviewed by: arch@, rwatson Discussed with: kan, kib [1]
* Add libjail, a (somewhat) simpler interface to the jail_set and jail_getjamie2009-06-246-2/+1450
| | | | | | system calls and the security.jail.param sysctls. Approved by: bz (mentor)
* Fix copy-and-paste-o's from kinfo_getfile.3 in kinfo_getvmmap.3.rwatson2009-06-241-2/+2
| | | | MFC after: 3 days
* Update SCCS IDs for Berkeley DB 1.86 merge.delphij2009-06-242-2/+2
|
* style: operators should appear at the line end if we have to wrap.delphij2009-06-241-2/+2
|
* Use const instead of __const, and merge the license change from NetBSD.delphij2009-06-231-9/+3
| | | | Obtained from: NetBSD
* Merge NetBSD revision 1.14: humanize_number.c is now 2-clause BSD licensed.delphij2009-06-231-8/+1
| | | | | | | (humanize_number.3 intentionally hold back until I make sure why we didn't merged dehumanize_number(3)). Obtained from: NetBSD
* K&R -> ANSIdelphij2009-06-233-10/+5
|
* Remove duplicate if-statement on gmt_is_set in gmtsub().edwin2009-06-231-8/+6
| | | | MFC after: 1 week
* Usermode portion of the support for swap allocation accounting:kib2009-06-232-0/+10
| | | | | | | | | | | - update for getrlimit(2) manpage; - support for setting RLIMIT_SWAP in login class; - addition to the limits(1) and sh and csh limit-setting builtins; - tuning(7) documentation on the sysctls controlling overcommit. In collaboration with: pho Reviewed by: alc Approved by: re (kensmith)
* Add a limit for child jails via the "children.cur" and "children.max"jamie2009-06-231-7/+7
| | | | | | parameters. This replaces the simple "allow.jails" permission. Approved by: bz (mentor)
* Remove unneeded stdlib directories.ed2009-06-234-12/+0
| | | | | | | It's not necessary to add stdlib directories for each architecture, even if the architecture doesn't implement any files of its own. Submitted by: Christoph Mallon
* Simplify. We can just use .sinclude here.ed2009-06-231-3/+1
| | | | Submitted by: Christoph Mallon
OpenPOWER on IntegriCloud