summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Staticize label_default_head to prevent it from leaking out of mac.c.Robert Watson2003-11-171-1/+1
| | | | | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=122868
* Baby steps. Set WARNS=1 for libc.Jacques Vidrine2003-11-171-0/+1
| | | | Notes: svn path=/head/; revision=122831
* Detect range errors when using the %s specifier. Previously, LONG_MAXJacques Vidrine2003-11-171-3/+10
| | | | | | | | | | was rejected as a range error, while any values less than LONG_MIN were silently substituted with LONG_MIN. Furthermore, on some platforms `time_t' has less range than `long' (e.g. alpha), which may give incorrect results when parsing some strings. Notes: svn path=/head/; revision=122830
* Update mac_set.3 to account for new behavior of mac_set_fd() in theRobert Watson2003-11-161-5/+7
| | | | | | | | | | | context of sockets, and document EINVAL as a possible failure mode based on the object selected, not just the label provided. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=122811
* Implement mac_get_peer(3) using getsockopt() with SOL_SOCKET andRobert Watson2003-11-162-26/+43
| | | | | | | | | | | | | | | | | | | | | SO_PEERLABEL. This provides an interface to query the label of a socket peer without embedding implementation details of mac_t in the application. Previously, sizeof(*mac_t) had to be specified by an application when performing getsockopt(). Document mac_get_peer(3), and expand documentation of the other mac_get(3) functions. Note that it's possible to get EINVAL back from mac_get_fd(3) when pointing it at an inappropriate object. NOTE: mac_get_fd() and mac_set_fd() support for sockets will follow shortly, so the documentation is slightly ahead of the code. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=122810
* Memory allocated by mac_to_text() must be freed using free(3) notRobert Watson2003-11-161-2/+15
| | | | | | | | | | | mac_free(3), which is used only for variables of type mac_t in the FreeBSD implementation. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=122777
* Resync. struct statfs and flag definitions with sys/mount.h.Tim J. Robbins2003-11-161-22/+57
| | | | Notes: svn path=/head/; revision=122776
* Remove debugging printf that crept into the last commit.Robert Watson2003-11-151-1/+0
| | | | Notes: svn path=/head/; revision=122735
* /etc/mac.conf is implicitly read and parsed when the MAC configurationRobert Watson2003-11-151-20/+6
| | | | | | | | | | | | | | is accessed for the first time as a result of an application looking up label configuration information. Previously, the check and read were kicked off by mac_prepare_(typename)() functions; since mac_prepare_type() may now be directly employed by a user process, push the check and initialization into that function. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=122732
* Update cross references after utf2/euc move.Tim J. Robbins2003-11-1510-18/+18
| | | | Notes: svn path=/head/; revision=122730
* Remove section 4 versions of these manual pages, they have beenTim J. Robbins2003-11-152-232/+0
| | | | | | | moved into section 5. Notes: svn path=/head/; revision=122728
* Install the section 5 versions of EUC and UTF2 manual pages instead ofTim J. Robbins2003-11-151-2/+1
| | | | | | | the section 4 versions. Notes: svn path=/head/; revision=122727
* Update the EUC and UTF2 manual pages for their new home in section 5.Tim J. Robbins2003-11-152-2/+2
| | | | | | | These have been repo-copied from euc.4 and utf2.4. Notes: svn path=/head/; revision=122724
* Add the userland part of the NET_RT_IFMALIST sysctl MIB. A new function,Bruce M Simpson2003-11-143-2/+322
| | | | | | | | | getifmaddrs(), is added to retrieve current multicast group memberships. Reviewed by: harti Notes: svn path=/head/; revision=122687
* u_int8_t cannot carry a number greater than 255.Hajimu UMEMOTO2003-11-141-3/+1
| | | | | | | Reported by: nectar Notes: svn path=/head/; revision=122682
* - Add documentation for EBUSY.Alan Cox2003-11-141-2/+4
| | | | | | | | - Remove EIO. - Add a cross reference to mlock(2). Notes: svn path=/head/; revision=122647
* - Use the magic for ___sigreturn in __sigset.Jeff Roberson2003-11-141-3/+11
| | | | | | | | | | | - In __sigreturn call sigprocmask() to restore our signal state rather than returning through sigreturn(). jmp to ___sigreturn to restore our register state following this. Requested by: pete Notes: svn path=/head/; revision=122633
* Use __sfvwrite() instead of __sputc() via __fputwc() to write to fakeTim J. Robbins2003-11-121-1/+30
| | | | | | | | | | | string files (__SSTR flag set). This is necessary because __sputc() does not respect the __SALC flag, and crashes trying to flush the buffer instead of resizing it. PR: 59167 Notes: svn path=/head/; revision=122547
* - Markup fix-ups (add .Dq, and some hard line breaks at the endKen Smith2003-11-111-4/+10
| | | | | | | | | of sentences). Approved by: blackend (mentor) Notes: svn path=/head/; revision=122504
* - Add a note about how jail(2) effects the securelevel.Ken Smith2003-11-111-0/+6
| | | | | | | | Reviewed by: rwatson Approved by: blackend (mentor) Notes: svn path=/head/; revision=122503
* Add information about the EVFILT_NETDEV filterChristian Brueffer2003-11-111-0/+24
| | | | | | | | | PR: docs/56872 (based on) Submitted by: Suleiman Souhlal <refugee@vt.edu> Reviewed by: hmp, jmg Notes: svn path=/head/; revision=122489
* Fix a typo that caused mbrtowc() to always return 0.Tim J. Robbins2003-11-111-1/+1
| | | | Notes: svn path=/head/; revision=122467
* Add a section documenting the sysctl(8) tunables that influence theJoseph Koshy2003-11-111-2/+15
| | | | | | | | operation of ktrace(2). Add a cross-reference to sysctl(8). Make the language of rev 1.22 more consistent with the rest of the manual page. Notes: svn path=/head/; revision=122459
* Improve the performance of radixsort() whenTim Kientzle2003-11-111-0/+11
| | | | | | | | | | | | | | | | sorting strings with common prefixes by noting when all the strings land in just one bin. Testing shows significant speedups (on the order of 30%) on strings with common prefixes and no slowdowns on any of my test cases. Submitted by: Markus Bjartveit Kruger <markusk@pvv.ntnu.no> PR: 58860 Approved by: gordon (mentor) Notes: svn path=/head/; revision=122458
* Have utrace(2) return ENOMEM if malloc() fails. Document this errorJoseph Koshy2003-11-111-4/+6
| | | | | | | | | return in its manual page. Reviewed by: jhb Notes: svn path=/head/; revision=122457
* Remove ',' accidentally added after ".Xr fork 2".Guy Helmer2003-11-101-1/+1
| | | | Notes: svn path=/head/; revision=122443
* Prevent abnormal termination of a child daemon process when createdGuy Helmer2003-11-102-3/+35
| | | | | | | | | | | | | by a parent that is a session leader (e.g., login shell) by ignoring SIGHUP in before calling fork(2) and then restoring SIGHUP's action after setsid(3). Based on the patch by Martin Kammerhofer <mkamm@gmx.net>. PR: bin/25462 Reviewed by: bde, alex.neyman@auriga.ru Notes: svn path=/head/; revision=122442
* Document EINVAL for len == 0.Dag-Erling Smørgrav2003-11-101-1/+1
| | | | Notes: svn path=/head/; revision=122391
* Document KTR_DROP.Joseph Koshy2003-11-101-0/+9
| | | | Notes: svn path=/head/; revision=122388
* Virtual addresses in headers of ELF files for dynamic objects needMarcel Moolenaar2003-11-081-6/+9
| | | | | | | to be relocated before they can be used as pointers. Notes: svn path=/head/; revision=122298
* Add one more cross-reference to gb2312(5).Tim J. Robbins2003-11-081-0/+1
| | | | Notes: svn path=/head/; revision=122290
* Add cross-references to new gb2312(5) manual page.Tim J. Robbins2003-11-082-0/+2
| | | | Notes: svn path=/head/; revision=122287
* Add a fairly simple manual page for the new GB2312 encoding.Tim J. Robbins2003-11-082-1/+58
| | | | Notes: svn path=/head/; revision=122285
* Remove unused #includes.Tim J. Robbins2003-11-085-11/+0
| | | | Notes: svn path=/head/; revision=122283
* Use __inline instead of inline.Tim J. Robbins2003-11-081-1/+1
| | | | Notes: svn path=/head/; revision=122282
* Refer to wide characters instead of runes. Remove redundant example locale.Tim J. Robbins2003-11-082-246/+36
| | | | | | | | | Catch up with renaming of "Japanese" to "ja_JP.eucJP". Comment out the statement that EUC is provided for compatibility with UNIX-based systems; this is not a very good opening paragraph. Notes: svn path=/head/; revision=122281
* Refer to wide characters instead of runes.Tim J. Robbins2003-11-082-4/+6
| | | | Notes: svn path=/head/; revision=122280
* Rephrase .Nd description to contain the keyTim Kientzle2003-11-061-1/+1
| | | | | | | | | | words "pattern" and "test"; this should make it easier to find with "man -k" Approved by: gordon (mentor) Notes: svn path=/head/; revision=122155
* Add gb2312 encoding.David Xu2003-11-053-1/+120
| | | | Notes: svn path=/head/; revision=122145
* Remove #include of spinlock.h from libc_private.h. Declare spinlocks asDaniel Eischen2003-11-052-5/+4
| | | | | | | | | | struct _spinlock. Keep the typedef in for now; another set of changes may come around to clean up consumers of spinlocks. Requested by: bde Notes: svn path=/head/; revision=122129
* Pass NULL instead of a pointer to a zeroed mbstate_t object.Tim J. Robbins2003-11-056-37/+17
| | | | Notes: svn path=/head/; revision=122105
* Pass NULL instead of a pointer to a zeroed mbstate_t object.Tim J. Robbins2003-11-052-10/+4
| | | | Notes: svn path=/head/; revision=122104
* Implement mbrtowc() and wcrtomb() directly (sync with big5.c).Tim J. Robbins2003-11-051-53/+50
| | | | Notes: svn path=/head/; revision=122103
* Externalize malloc's spinlock so that a thread library can takeDaniel Eischen2003-11-042-0/+9
| | | | | | | | | | | | | | it around an application's fork() call. Our new thread libraries (libthr, libpthread) can now have threads running while another thread calls fork(). In this case, it is possible for malloc to be left in an inconsistent state in the child. Our thread libraries, libpthread in particular, need to use malloc internally after a fork (in the child). Reviewed by: davidxu Notes: svn path=/head/; revision=122069
* Pass mbrtowc() and wcrtomb() NULL instead of a pointer to a freshly zeroedTim J. Robbins2003-11-043-9/+3
| | | | | | | | | | mbstate_t object that they ignore. The zeroing is fairly expensive, and it will never be necessary in these functions; when we support state-dependent encodings, we will pass in a pointer to the file's mbstate_t object, and only zero it at the time the file gets opened. Notes: svn path=/head/; revision=122042
* Add a reference to the new utrace(2) manual page.Tim J. Robbins2003-11-041-1/+2
| | | | Notes: svn path=/head/; revision=122040
* When printing ACLs, truncate user and group names if they're too long,Robert Watson2003-11-031-3/+5
| | | | | | | | | | | | rather than generating an error. This is consistent with other tools printing user and group names, and means you can read the ACL using our tools rather than being up a creek. PR: 56991 Submitted by: Michael Bretterklieber <mbretter@a-quadrat.at> Notes: svn path=/head/; revision=121975
* Convert the Big5, EUC, MSKanji and UTF-8 encoding methods to implementTim J. Robbins2003-11-024-254/+233
| | | | | | | | | mbrtowc() and wcrtomb() directly. GB18030, GBK and UTF2 are left unconverted; GB18030 will be done eventually, but GBK and UTF2 may just be removed, as they are subsets of GB18030 and UTF-8 respectively. Notes: svn path=/head/; revision=121893
* Remove TODO comment about creating a macro version of towctrans().Tim J. Robbins2003-11-011-4/+0
| | | | | | | Remove unnecessary inclusion of <ctype.h>. Notes: svn path=/head/; revision=121852
* Fix a typo that caused the optimized single-byte locale path not to be taken.Tim J. Robbins2003-11-011-1/+1
| | | | Notes: svn path=/head/; revision=121851