aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/sys
Commit message (Collapse)AuthorAgeFilesLines
* MFC r241855:Eitan Adler2012-10-291-8/+15
| | | | | | | | | | Update the kill(2) and killpg(2) man pages to the modern permission checks. Also indicate killpg(2) is POSIX compliant. Approved by: cperciva (implicit) Notes: svn path=/stable/7/; revision=242299
* Undo MFC r234131:Eitan Adler2012-05-072-12/+7
| | | | | | | | | | The kernel change can't be MFCed so undo the documentation MFC. PR: kern/164970 Approved by: cperciva (implicit) Notes: svn path=/stable/7/; revision=235127
* MFC r234820:Eitan Adler2012-05-061-0/+2
| | | | | | | | | | pread(2) might fail with EBUSY, so document it PR: docs/167201 Approved by: cperciva (implicit) Notes: svn path=/stable/7/; revision=235090
* MFC r234131:Eitan Adler2012-05-032-7/+12
| | | | | | | | | | | Return EBADF instead of EMFILE from dup2 when the second argument is outside the range of valid file descriptors PR: kern/164970 Approved by: cperciva (implicit) Notes: svn path=/stable/7/; revision=234968
* MFC r233160:Benjamin Kaduk2012-04-241-2/+20
| | | | | | | | | | | Expound a bit more about the system maximum number of FIBs, how it may be set, and current limitations on the value. PR: docs/157453 Approved by: hrs (mentor) Notes: svn path=/stable/7/; revision=234630
* MFC r230613:Sergey Kandaurov2012-01-301-2/+1
| | | | | | | Remove a left-over reference to make.conf(5) for now-defunct -DVM_STACK Notes: svn path=/stable/7/; revision=230773
* MFC r227792:Sergey Kandaurov2012-01-041-2/+4
| | | | | | | | | | Add history for setsockopt(2). PR: docs/162719 Submitted by: Niclas Zeising <niclas at zeising gmail> Notes: svn path=/stable/7/; revision=229491
* MFC r227416:Doug Barton2011-11-181-1/+3
| | | | | | | Document that flock can return ENOLCK Notes: svn path=/stable/7/; revision=227684
* MFC r226790:Sergey Kandaurov2011-11-011-1/+1
| | | | | | | Fix typo in timer_getoverrun cross-reference. Notes: svn path=/stable/7/; revision=226997
* MFC 181265 [1]:Glen Barber2011-06-111-0/+2
| | | | | | | | | | Document EAGAIN in ERRORS according to kern_jail.c. PR: 125253 Original commit by: trhodes [1] Notes: svn path=/stable/7/; revision=222969
* MFC 186489 [1]:Glen Barber2011-06-111-1/+5
| | | | | | | | | | Document that kldunloadf can return EINVAL. PR: 125639 Original commit by: trhodes [1] Notes: svn path=/stable/7/; revision=222964
* MFC r222037: mq_setattr(2): Add missing const to man page.Jilles Tjoelker2011-05-241-2/+2
| | | | | | | The declaration in the header file is correct. Notes: svn path=/stable/7/; revision=222271
* MFC 220975:Glen Barber2011-04-261-4/+4
| | | | | | | | | | | - Clarification on kld_file_stat.size - While here, remove a few C comments that don't seem to contribute anything additional to the man page. PR: 146047 Notes: svn path=/stable/7/; revision=221065
* MFC r220646: getfh(2): Add xrefs for fhopen(2), open(2), stat(2).Jilles Tjoelker2011-04-221-1/+5
| | | | Notes: svn path=/stable/7/; revision=220953
* MFC 212492:Glen Barber2011-02-181-1/+1
| | | | | | | | Bump date in cpuset_getaffinity(2). Note, the original commit also affects dbopen(3), however that change is not needed here. Notes: svn path=/stable/7/; revision=218814
* MFC 212438:Glen Barber2011-02-151-0/+6
| | | | | | | | | | Add EINVAL to list of possible return values for cpuset_getaffinity(2). PR: 149978 Approved by: keramida (mentor) Notes: svn path=/stable/7/; revision=218693
* MFC r217704: getgroups(2): Remove <sys/types.h> and refer to sysconf(3).Jilles Tjoelker2011-01-301-3/+9
| | | | | | | | | | | Because {NGROUPS_MAX} may become variable, its value should be obtained using sysconf(3). In head, r217704 removed mention of <sys/param.h>; this was not mentioned in stable/7. Notes: svn path=/stable/7/; revision=218104
* MFC r217484: mknod(2): The required include is <sys/stat.h>, not <unistd.h>.Jilles Tjoelker2011-01-251-2/+2
| | | | | | | | | | | This is what SUSv4 requires, and also the only thing that works if strict standards compliance is requested. PR: standards/123688 Submitted by: gcooper Notes: svn path=/stable/7/; revision=217854
* MFC r199985 from /headGiorgos Keramidas2011-01-191-0/+5
| | | | | | | | | | | | | Describe what setpgid(2) does when pgid=0. The text has been copied from NetBSD’s manpage, and it also matches the behavior described by the Open Group’s online copy of setpgid.2 at http://www.opengroup.org/onlinepubs/009695399/functions/setpgid.html Obtained from: NetBSD Submitted by: Petros Barbayiannis <petrosbarbayiannis@yahoo.gr> Notes: svn path=/stable/7/; revision=217605
* MFC 212269.Glen Barber2010-09-131-1/+3
| | | | | | | | | Add ECONNRESET to connect(2). Approved by: keramida (mentor) Notes: svn path=/stable/7/; revision=212565
* MFC r210641: Fix a couple of typos.Ulrich Spörlein2010-08-061-1/+1
| | | | | | | | PR: docs/148891 Submitted by: olgeni Notes: svn path=/stable/7/; revision=210920
* Change the current working directory to be inside the jail created byColin Percival2010-05-271-1/+8
| | | | | | | | | | | | | | | | | the jail(8) command. [10:04] Fix a one-NUL-byte buffer overflow in libopie. [10:05] Correctly sanity-check a buffer length in nfs mount. [10:06] Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-10:04.jail Security: FreeBSD-SA-10:05.opie Security: FreeBSD-SA-10:06.nfsclient Notes: svn path=/stable/7/; revision=208586
* MFC r206549:Konstantin Belousov2010-04-211-8/+13
| | | | | | | | | | | | | | Align the declaration for sa_sigaction with POSIX. MFC r206649: Still reference struct __sigaction with clarification when this form of argument declaration is needed. MFC r206802: Revert r206649. Simplify the presented declaration of struct sigaction. Notes: svn path=/stable/7/; revision=206991
* MFC 205536:John Baldwin2010-04-141-1/+6
| | | | | | | Reject attempts to create a MAP_ANON mapping with a non-zero offset. Notes: svn path=/stable/7/; revision=206603
* MFC 184226:John Baldwin2010-04-141-8/+6
| | | | | | | Add a statement about the non-portability of non-page-aligned offsets. Notes: svn path=/stable/7/; revision=206601
* MFC r201892:Xin LI2010-01-232-4/+8
| | | | | | | | | Add a set of manual pages for pthread[_attr]_[sg]etaffinity(3). Reviewed by: davidxu Notes: svn path=/stable/7/; revision=202856
* MFC: r202176Christian Brueffer2010-01-193-22/+30
| | | | | | | Miscellaneous mdoc, spelling and inconsistency fixes. Notes: svn path=/stable/7/; revision=202633
* MFC r201201:Konstantin Belousov2010-01-011-11/+44
| | | | | | | | | | Document CLOCK_SECOND, add cross-reference from time(3) to clock_gettime(2). MFC r201204: Document _FAST and _PRECISE clocks. Notes: svn path=/stable/7/; revision=201363
* MFC r200589: cpuset(2): fix a typo and a markup error in the man pageJilles Tjoelker2009-12-221-2/+2
| | | | Notes: svn path=/stable/7/; revision=200837
* MFC: r199255, r199257Christian Brueffer2009-11-201-10/+2
| | | | | | | | | | Improved the manpage description. The committed wording was provided by jhb. Remove a note about vfork(4) going to be eliminated, it's here to stay. Notes: svn path=/stable/7/; revision=199569
* MFC r197958:Konstantin Belousov2009-10-141-1/+3
| | | | | | | | | In nanosleep(2), note that the calling thread is put to sleep, not the whole process. Also explicitely name the parameter that specifies sleep interval. Notes: svn path=/stable/7/; revision=198081
* MFC: r197312Christian Brueffer2009-10-121-2/+2
| | | | | | | Fix setfib(1) section number. Notes: svn path=/stable/7/; revision=197979
* MFC: Change the ABI of some of the structures used by the SYSV IPC API:John Baldwin2009-07-314-21/+9
| | | | | | | | | | | | | | | | | | | | | - Various members of struct ipc_perm use appropriate types instead of unsigned short. - The shm_segsz member of struct shmid_ds is now a size_t instead of an int which 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 existing versions of the __semctl(), msgctl(), and shmctl() system calls have been renamed to freebsd7_*() and implement the old ABI. New versions of these system calls provide the new ABI. The new system calls also use newer symbol versions in libc so old and new binaries will both work under new kernels. - Specific to 7.x: the kern_msgctl(), kern_semctl(), and kern_shmctl() functions now use ABI shims that transparently "rename" the functions to kern_new_*() for all new modules. Existing compat functions under the old names remain to provide compatibility for older kernel modules. Notes: svn path=/stable/7/; revision=196006
* MFC r194494 to improve support for 7.x worlds on >=8.0 kernels:Brooks Davis2009-07-242-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | In preparation for raising NGROUPS and NGROUPS_MAX, change base system callers of getgroups(), getgrouplist(), and setgroups() to allocate buffers dynamically. Specifically, allocate a buffer of size sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow). This (or similar gymnastics) is required for the code to actually follow the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime and where getgroups may return {NGROUPS_MAX}+1 results on systems like FreeBSD which include the primary group. In id(1), don't pointlessly add the primary group to the list of all groups, it is always the first result from getgroups(). In principle the old code was more portable, but this was only done in one of the two places where getgroups() was called to the overall effect was pointless. Document the actual POSIX requirements in the getgroups(2) and setgroups(2) manpages. We do not yet support a dynamic NGROUPS, but we may in the future. Notes: svn path=/stable/7/; revision=195859
* MFC: Several cleanups to the syscall tables:John Baldwin2009-07-241-3/+0
| | | | | | | | | | | | | | | | | | | | | | - Add explicit prototypes for lkmnosys() and lkmressys() in <sys/sysent.h> and remove hacks for those routines from makesyscalls.sh. - Change the LKM syscall entries in the freebsd32 table to use lkmnosys rather than nosys. - Use NOPROTO for __syscall() to remove more magic logic from makesyscalls.sh. - Retire the unused nfsclnt() system call and mark it as UNIMPL rather than NOIMPL. - Remove the NOIMPL system call type. - Allow multiple flags in the type system call type field. Use this to retire CPT_NOA. - Update the comment descriptions for COMPAT[45] system calls in various generated files. - Update comments in syscalls.master. - Include defintions for audit identifiers for compat system calls in <sys/sysproto.h>. Notes: svn path=/stable/7/; revision=195854
* MFC: Add a new 'void closefrom(int lowfd)' system call. When called, itJohn Baldwin2009-07-144-1/+58
| | | | | | | | closes any open file descriptors >= 'lowfd'. Bump __FreeBSD_version to 702104. Notes: svn path=/stable/7/; revision=195694
* MFC r191414Christian Brueffer2009-04-231-1/+1
| | | | | | | | | | Correct the information about when the respective functionality first appeared in FreeBSD. Approved by: re (kensmith) Notes: svn path=/stable/7/; revision=191425
* MFC r189283:Konstantin Belousov2009-03-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | Correct types of variables used to track amount of allocated SysV shared memory from int to size_t. Implement a workaround for current ABI not allowing to properly save size for and report more then 2GB sized segment of shared memory. This makes it possible to use > 2 GB shared memory segments on 64bit architectures. Please note the new BUGS section in shmctl(2) and UPDATING note for limitations of this temporal solution. MFC r189398: Systematically use vm_size_t to specify the size of the segment for VM KPI. Do not overload the local variable size in kern_shmat() due to vm_size_t change. Fix style bug by adding explicit comparision with 0. MFC r189399: Improve the grammar and wording in the changes to shmctl(2) manpage. Put an UPDATING entry and bump __FreeBSD_version for the change. Notes: svn path=/stable/7/; revision=189740
* MFC: Add support for "superpages" on amd64 and i386. This includes adding theJohn Baldwin2009-02-261-0/+2
| | | | | | | | | | | superpage reservation system to the machine-independent VM system as well as changes to the pmap code for amd64 and i386 to support superpages. Reviewed by: alc Tested by: ps Notes: svn path=/stable/7/; revision=189075
* MFC:Jamie Gritton2009-02-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r188144: Standardize the various prison_foo_ip[46] functions and prison_if to return zero on success and an error code otherwise. The possible errors are EADDRNOTAVAIL if an address being checked for doesn't match the prison, and EAFNOSUPPORT if the prison doesn't have any addresses in that address family. For most callers of these functions, use the returned error code instead of e.g. a hard-coded EADDRNOTAVAIL or EINVAL. Always include a jailed() check in these functions, where a non-jailed cred always returns success (and makes no changes). Remove the explicit jailed() checks that preceded many of the function calls. r188146: Don't allow creating a socket with a protocol family that the current jail doesn't support. This involves a new function prison_check_af, like prison_check_ip[46] but that checks only the family. With this change, most of the errors generated by jailed sockets shouldn't ever occur, at least until jails are changeable. r188148: Remove redundant calls of prison_local_ip4 in in_pcbbind_setup, and of prison_local_ip6 in in6_pcbbind. r188149: Call prison_if from rtm_get_jailed, instead of splitting it out into prison_check_ip4 and prison_check_ip6. As prison_if includes a jailed() check, remove that check before calling rtm_get_jailed. r188151: Don't bother null-checking the thread pointer before the prison checks in udp6_connect (td is already dereferenced elsewhere without such a check). This makes the conversion from a sockaddr to a sockaddr_in6 always happen, so convert once at the beginning of the function rather than twice in the middle. Approved by: bz (mentor) Notes: svn path=/stable/7/; revision=188761
* MFC:Bjoern A. Zeeb2009-02-072-9/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r185435: This enhances the current jail implementation to permit multiple addresses per jail. In addtion to IPv4, IPv6 is supported as well. Due to updated checks it is even possible to have jails without an IP address at all, which basically gives one a chroot with restricted process view, no networking,.. SCTP support was updated and supports IPv6 in jails as well. Cpuset support permits jails to be bound to specific processor sets after creation. Jails can have an unrestricted (no duplicate protection, etc.) name in addition to the hostname. The jail name cannot be changed from within a jail and is considered to be used for management purposes or as audit-token in the future. DDB 'show jails' command was added to aid debugging. Proper compat support permits 32bit jail binaries to be used on 64bit systems to manage jails. Also backward compatibility was preserved where possible: for jail v1 syscalls, as well as with user space management utilities. Both jail as well as prison version were updated for the new features. A gap was intentionally left as the intermediate versions had been used by various patches floating around the last years. Bump __FreeBSD_version for the afore mentioned and in kernel changes. r185441: Unbreak the no-networks (no INET/6) build. r185899: Correctly check the number of prison states to not access anything outside the prison_states array. When checking if there is a name configured for the prison, check the first character to not be '\0' instead of checking if the char array is present, which it always is. Note, that this is different for the *jailname in the syscall. Found with: Coverity Prevent(tm) CID: 4156, 4155 r186085: Make sure that the direct jls invocations prints something reasonable close to and in the same format as it had always. r186606: Make sure that unused j->ip[46] are cleared. r186834: Document the special loopback address behaviour of jails. PR: kern/103464 r186841: Put the devfs ruleset next to devfs enable, add a comment about the suggested ruleset[1]. While here use an IP from the 'test-net' prefix for docs. PR: kern/130102 r187059: Add a short section talking about jails and file systems; mention the mountand jail-aware file systems as well as quota. PR: kern/68192 r187092: Sort .Xr. r187365: s,unmount 8,umount 8, it is unmount(2) which I did not mean. r187669: Update the description of the '-h' option wrt to primary addresses per address family and add a reference to the ip-addresses option. r187670: New sentence starts on a new line. Notes: svn path=/stable/7/; revision=188281
* MFC r187098:Daniel Gerzo2009-01-181-2/+3
| | | | | | | | | | | - add missing include [2] - fix struct memeber's name [1] PR: docs/130413 [1] Submitted by: Thomas Mueller <tmueller@sysgo.com> [1], rink@ [2] Notes: svn path=/stable/7/; revision=187411
* MFC r180534:Daniel Gerzo2009-01-061-3/+3
| | | | | | | | | | - Update the definition of modspecific structure PR: docs/125630 Submitted by: Mateusz Guzik <mjguzik@gmail.com> Notes: svn path=/stable/7/; revision=186811
* MFC: Note that support for CPU sets will first appear in 7.1.John Baldwin2008-10-022-2/+2
| | | | | | | Approved by: re (kib) Notes: svn path=/stable/7/; revision=183553
* MFC r182193 (libc part):Konstantin Belousov2008-09-191-2/+10
| | | | | | | | | Document WNOWAIT. Approved by: re (kensmith) Notes: svn path=/stable/7/; revision=183185
* MFC r181312:Tom Rhodes2008-08-291-1/+3
| | | | | | | | | Add EPERM to the ERRORS section. PR: 125746 Notes: svn path=/stable/7/; revision=182420
* MFC r175798:Tom Rhodes2008-08-031-6/+13
| | | | | | | | | | | | Update this manual page to describe the extattr_list_file() and the extattr_list_fd() functions. PR: 108142 Submitted by: Richard Dawe <rich@phekda.gotadsl.co.uk> Reviewed by: kientzle Notes: svn path=/stable/7/; revision=181259
* Fix whitespace bug (8spaces into tab).Remko Lodder2008-08-021-1/+1
| | | | | | | Submitted by: ed Notes: svn path=/stable/7/; revision=181181
* MFC r180491Remko Lodder2008-08-021-4/+4
| | | | | | | | | | | Update the ktr_header structure, which changed over time. PR: 125546 Submitted by: Mateusz Guzik <mjguzik at gmail dot com> MFC after: 3 days Notes: svn path=/stable/7/; revision=181179
* MFC: Add cpuset, an api for thread to cpu binding and cpu resource groupingJohn Baldwin2008-07-254-2/+402
| | | | | | | | | | | | | | | | | | | | and assignment. This is mostly synched up with what is in HEAD with the following exceptions: - I didn't MFC any of the interrupt binding stuff as it requires other changes and I figured this change was large enough as it is. - The sched_affinity() implementation for ULE in HEAD depends on the newer CPU topology stuff as well as other changes in ULE. Rather than backport all of that, I implemented sched_affinity() using the existing CPU topology and ULE code in 7.x. Thus, any bugs in the ULE affinity stuff in 7 are purely my fault and not Jeff's. Note that, just as in HEAD, cpusets currently don't work on SCHED_4BSD (the syscalls will succeed, but they don't have any effect). Tested by: brooks, ps Notes: svn path=/stable/7/; revision=180808