summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Document how to enable strict RFC 1034 enforcements.delphij2009-05-291-1/+14
| | | | PR: kern/129477
* Add an option to enforce strict RFC 1034 compliance.delphij2009-05-291-0/+4
| | | | PR: kern/129477
* Match type for socket option (in practice, unnecessary, but stylistically ↵zml2009-05-281-1/+1
| | | | | | | it's a little nicer). Suggested by: jilles Approved by: dfr (mentor)
* Revert unnecessary memset after calloc.zml2009-05-281-1/+0
| | | | | Suggested by: jhb Approved by: dfr (mentor)
* Fix off by one error in acl_create_entry(3).trasz2009-05-281-1/+6
| | | | | Reviewed by: rwatson@ MFC after: 2 weeks
* Rename the queue macros I introduced last year.ed2009-05-271-1/+1
| | | | | | | | | | | | | | | | Last year I added SLIST_REMOVE_NEXT and STAILQ_REMOVE_NEXT, to remove entries behind an element in the list, using O(1) time. I recently discovered NetBSD also has a similar macro, called SLIST_REMOVE_AFTER. In my opinion this approach is a lot better: - It doesn't have the unused first argument of the list pointer. I added this, mainly because OpenBSD also had it. - The _AFTER suffix makes a lot more sense, because it is related to SLIST_INSERT_AFTER. _NEXT is only used to iterate through the list. The reason why I want to rename this now, is to make sure we don't release a major version with the badly named macros.
* Handle UDP RPC replies correctly on a multi-homed system, in userland RPC. ↵zml2009-05-272-6/+107
| | | | | | Corrects an issue with mountd replies to OS X. Approved by: dfr (mentor)
* Fix an issue when nss fallback routines are used in a multithreaded application.zml2009-05-272-4/+24
| | | | | Reviewed by: bushman Approved by: dfr (mentor)
* Add hierarchical jails. A jail may further virtualize its environmentjamie2009-05-271-5/+21
| | | | | | | | | | | | | | | | | | | | | | by creating a child jail, which is visible to that jail and to any parent jails. Child jails may be restricted more than their parents, but never less. Jail names reflect this hierarchy, being MIB-style dot-separated strings. Every thread now points to a jail, the default being prison0, which contains information about the physical system. Prison0's root directory is the same as rootvnode; its hostname is the same as the global hostname, and its securelevel replaces the global securelevel. Note that the variable "securelevel" has actually gone away, which should not cause any problems for code that properly uses securelevel_gt() and securelevel_ge(). Some jail-related permissions that were kept in global variables and set via sysctls are now per-jail settings. The sysctls still exist for backward compatibility, used only by the now-deprecated jail(2) system call. Approved by: bz (mentor)
* MFV of tzcode2009h revision r192887edwin2009-05-271-1/+1
| | | | | | - Clarify the license for the tzcode: public domain MFC after: 1 month
* Change license to more bori^Wadul^Wcanonical.trasz2009-05-261-11/+11
| | | | Submitted by: rwatson@
* Improve API documentation.trasz2009-05-235-1/+39
| | | | Reviewed by: rwatson (earlier version)
* MFV of tzcode2009e:edwin2009-05-238-376/+922
| | | | | | | | | | | | | | | | | | | | | | | | | Upgrade of the tzcode from 2004a to 2009e. Changes are numerous, but include... - New format of the output of zic, which supports both 32 and 64 bit time_t formats. - zdump on 64 bit platforms will actually produce some output instead of doing nothing for a looooooooong time. - linux_base-fX, with X >= at least 8, will work without problems related to the local time again. The original patch, based on the 2008e, has been running for a long time on both my laptop and desktop machine and have been tested by other people. After the installation of this code and the running of zic(8), you need to run tzsetup(8) again to install the new datafile. Approved by: wollman@ for usr.sbin/zic MFC after: 1 month
* Make 'struct acl' larger, as required to support NFSv4 ACLs. Providetrasz2009-05-2211-6/+111
| | | | | | compatibility interfaces in both kernel and libc. Reviewed by: rwatson
* Since audit(4) isn't based on posix1e, remove the commented out audit.h header,brueffer2009-05-191-2/+2
| | | | | | | xref libbsm(3). Submitted by: rwatson MFC after: 3 days
* As the comment says, close() frees the variable, record. So we obtaindelphij2009-05-141-1/+1
| | | | | | | | the length by evaluating the value from the copy, cbuf instead. This fixes a crash caused by previous commit (use-after-free) Submitted by: Dimitry Andric <dimitry andric com> Pointy hat to: delphij
* TTYs don't necessarily use /dev/ttyxx.ed2009-05-091-3/+2
| | | | Submitted by: csjp
* Add tcsetsid(3).ed2009-05-075-3/+109
| | | | | | | | | | | The entire world seems to use the non-standard TIOCSCTTY ioctl to make a TTY a controlling terminal of a session. Even though tcsetsid(3) is also non-standard, I think it's a lot better to use in our own source code, mainly because it's similar to tcsetpgrp(), tcgetpgrp() and tcgetsid(). I stole the idea from QNX. They do it the other way around; their TIOCSCTTY is just a wrapper around tcsetsid(). tcsetsid() then calls into an IPC framework.
* revert r191633; this breaks at91 & xscale (likely all arm)sam2009-05-061-4/+4
|
* Our grantpt(3) and unlockpt(3) don't comply with POSIX.ed2009-05-041-3/+7
|
* Fix whitespace and sorting in Symbol.map.ed2009-05-041-25/+25
|
* Introduce the extensible jail framework, using the same "name=value"jamie2009-04-293-11/+262
| | | | | | | | | | | | | | interface as nmount(2). Three new system calls are added: * jail_set, to create jails and change the parameters of existing jails. This replaces jail(2). * jail_get, to read the parameters of existing jails. This replaces the security.jail.list sysctl. * jail_remove to kill off a jail's processes and remove the jail. Most jail parameters may now be changed after creation, and jails may be set to exist without any attached processes. The current jail(2) system call still exists, though it is now a stub to jail_set(2). Approved by: bz (mentor)
* With the permission of phk@ change the license on remaining jail codejamie2009-04-291-6/+22
| | | | | | | to a 2 clause BSD license. Approved by: phk Approved by: bz (mentor)
* Fix an obvious bug in getsourcefilter()'s use of struct __msfilterreq;bms2009-04-291-2/+3
| | | | | | | | | | | | | the kernel will return in msfr_nsrcs the number of source filters in-mode for a given multicast group. However, the filters themselves were never copied out, as the libc function clobbers this field with zero, causing the kernel to assume the provided vector of struct sockaddr_storage has zero length. This bug would only affect users of SSM multicast, which is shimmed in 7.x. Picked up during mtest(8) refactoring. MFC after: 1 day
* Change the test at the beginning of strncmp(), from being if (len - 1) < 0cognet2009-04-281-4/+4
| | | | | | | | | to if (len == 0). The length is supposed to be unsigned, so len - 1 < 0 won't happen except if len == 0 anyway, and it would return 0 when it shouldn't, if len was > INT_MAX. Spotted out by: Channa <channa kad gmail com>
* Fix typo.trasz2009-04-261-1/+1
|
* Correct the information about when the respective functionality firstbrueffer2009-04-232-2/+2
| | | | | | | | appeared in FreeBSD. PR: 133785 Submitted by: Ulrich Spoerlein <uqs@spoerlein.net> MFC after: 3 days
* There is no way for strmode(3) to append '+' if the file has ACL,trasz2009-04-142-4/+2
| | | | | because there is no way to figure that out based on the file mode itself. Make the manual page match reality.
* Sort man page cross references by section, no need for a comma after therwatson2009-04-133-4/+4
| | | | | | last cross reference. MFC after: 3 days
* Include a space between "send" and "broadcast".emaste2009-04-091-1/+1
|
* Add wide character variants of string manipulations routines to 'SEE ALSO'.trasz2009-04-0716-16/+33
| | | | Approved by: rwatson (mentor)
* Return -1 instead of 0 upon reaching EOF. This is somewhat ill-adviseddas2009-04-062-4/+6
| | | | | | | | because it means getdelim() returns -1 for both error and EOF, and never returns 0. However, this is what the original GNU implementation does, and POSIX inherited the bug. Reported by: marcus@
* Allow the NULL, RTLD_SELF and RTLD_NEXT handles to work with dlfunc(3).kib2009-04-033-31/+9
| | | | | | | | | | | | | | | | dlfunc() called dlsym() to do the work, and dlsym() determines the dso that originating the call by the return address. Due to this, dlfunc() operated as if the caller is always the libc. To fix this, move the dlfunc() to rtld, where it can call the internal implementation of dlsym, and still correctly fetch return address. Provide usual weak stub for the symbol from libc for static binaries. dlfunc is put to FBSD_1.0 symver namespace in the ld.so export to override dlfunc@FBSD_1.0 weak symbol, exported by libc. Reported, analyzed and tested by: Tijl Coosemans <tijl ulyssis org> PR: standards/133339 Reviewed by: kan
* Properly handle malloc() failures.delphij2009-04-021-5/+7
| | | | PR: bin/83338
* Remove a warning which is supposed to have been removed on 20030301.delphij2009-04-021-12/+0
|
* Properly update the shm_open/shm_unlink symbol versioning metadata afterjhb2009-04-022-2/+6
| | | | | | | these functions were moved into the kernel: - Move the version entries from gen/ to sys/. Since the ABI of the actual routines did not change, I'm still exporting them as FBSD 1.0 on purpose. - Add FBSD-private versions for the _ and __sys_ variants.
* Unconditionally build wrappers for i386_get_ioperm(), i386_set_ioperm(),kib2009-04-011-4/+3
| | | | | | | i386_get_ldt() and i386_set_ldt(). In collaboration with: pho Reviewed by: jhb
* Document RTLD_NODELETE, -z nodelete and -z origin support.kib2009-04-011-2/+9
|
* Query DNS only once per an address family.ume2009-03-291-86/+170
| | | | | Obtained from: KAME MFC after: 2 weeks
* Add some casts to silence compiler warning about signedness.delphij2009-03-282-3/+3
|
* Minor changes from Berkeley DB 1.86 and further improvements from OpenBSD.delphij2009-03-2810-115/+214
| | | | | | | | | | 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
* Allow O_SYNC and O_NOFOLLOW flags in dbopen().delphij2009-03-281-2/+2
| | | | Obtained from: OpenBSD
* Plug memory leaks and a potential NULL dereference.delphij2009-03-281-4/+12
| | | | Obtained from: OpenBSD
* Simplify the logic when determining whether to zero out a db file to afterdelphij2009-03-281-15/+5
| | | | | | | | open(). The previous logic only initializes the database when O_CREAT is set, but as long as we can open and write the database, and the database is empty, we should initialize it anyway. Obtained from: OpenBSD
* - If (keysize+datasize)%(bsize=14)==0, insertion of a `big key' would causedelphij2009-03-281-6/+18
| | | | | | | | | | | | | | | an invariant (actually, an ugly hack) to fail, and all Hell would break loose. When deleting a big key, the offset of an empty page should be bsize, not bsize-1; otherwise an insertion into the empty page will cause the new key to be elongated by 1 byte. Make the packing more dense in a couple of cases. - fix NULL dereference exposed on big bsize values; Obtained from: NetBSD via OpenBSD
* Avoid NULL deference which causes DEBUG1 to crash, not to print usefuldelphij2009-03-281-1/+1
| | | | | | information. Obtained from: OpenBSD
* - Avoid overwriting the cursor page when the cursor page becomes thedelphij2009-03-281-1/+21
| | | | | | | LRU page. - Fix for sequential retrieval failure when using large key/data pairs. Obtained from: OpenBSD
* Fix a crash when iterating over a hash and removing its elements.delphij2009-03-282-11/+21
| | | | Obtained from: OpenBSD
* Only squeeze a short key/value pair onto a page with other complete key/valuedelphij2009-03-281-3/+9
| | | | | | pairs, not onto a page containing the end of a big pair. Obtained from: NetBSD via OpenBSD
* Diff reduce against OpenBSD, no functional change.delphij2009-03-282-12/+6
|
OpenPOWER on IntegriCloud