summaryrefslogtreecommitdiff
path: root/lib/libc/gen
AgeCommit message (Collapse)Author
2009-09-08I had not enough oks to commit this diff.Michele Marchetto
Sorry.
2009-09-08Add support for divert sockets. They allow you to:Michele Marchetto
- queue packets from pf(4) to a userspace application - reinject packets from the application into the kernel stack. The divert socket can be bound to a special "divert port" and will receive every packet diverted to that port by pf(4). The pf syntax is pretty simple, e.g.: pass on em0 inet proto tcp from any to any port 80 divert-packet port 8000 test, bugfix and ok by reyk@ manpage help and ok by jmc@ no objections from many others.
2009-08-27Don't stop traversing a directory hierarchy if we reach SHRT_MAX,Todd C. Miller
just stop updating fts_level so we don't overflow it. This allows rm, find, etc to operate on very deep hierarchies. Consumers of fts(3) do need to be aware that the actual level may be larger than fts_level. During the next libc major bump we will make fts_level an int instead of a short. OK deraadt@
2009-07-15must include <sys/types.h> before including <login_cap.h> or <bsd_auth.h>;Ingo Schwarze
noticed by joao <salvatti at gmail dot com> on tech@; feedback and ok kettenis@ deraadt@ and reminded by jmc@
2009-06-23getgrouplist(3) used to and ought to return 0 on success;Ingo Schwarze
fixing a regression introduced in rev. 1.16 spotted by otto@; ok millert@ otto@
2009-06-09document KERN_BUFCACHEPERCENT and KERN_MAXLOCKSPERUID; help/ok ogaJason McIntyre
2009-06-07de-spaghetti:Ingo Schwarze
If code is used from exactly one place, don't jump back dozens of lines to reach it, only to "goto" back where you came from. Instead, simply put the code where it belongs. Also fixes a regression that crept in in rev. 1.30: After clearing the variable __ypmode, don't try to make decisions based on its former value. As a bonus, garbage collect the grname variable and the _ypmode enum type. ok millert@
2009-06-07Add KERN_FILE2 sysctl analogous to KERN_PROC2 but for file structures,Todd C. Miller
along with vnode type-specific info to make it more useful for fstat(1). OK deraadt@
2009-06-07No need to malloc, copy, have a single read access, and free right away.Ingo Schwarze
Thus, garbage collect one variable, one strdup, one free, two ifs, one else and a couple of assignments. No functional change. ok millert@
2009-06-05The yp_bind(3) return code now distinguishes "YP not active" from "an errorIngo Schwarze
occurred". Based on this, decide to either bail or use the record as is. Prevents getgrnam(3) and friends from silently skipping YP records on system errors, for example when out of memory. Also, calling yp_get_default_domain once is enough. The first two switch cases are unchanged, just reindented. ok millert@
2009-06-05When parsing a line stating with "+" or "-" in group(5),Ingo Schwarze
check whether YP is active up front, not half-way through the parsing. This fixes the bug that group names starting with a dash (yuck!) were skipped when YP was not active, introduced in rev. 1.27. Besides, the code becomes easier to understand. The code inside the two switch cases is unchanged, just reindented. "looks good" millert@
2009-06-04Recycle four ancient fields in the disklabel structure, replacing them withTheo de Raadt
bounds information, ie. the zone of the disk that OpenBSD can use. Have each pre-disklabel parser (MBR, DPME, or per-arch MD disklabel parsers) figure out this area and pass it up to userland. Then, delete all the same disk parsing code from disklabel(8) since the kernel passes it up. Lots and lots of - signs in the disklabel(8) code. Tested on as many platforms as possible, the fallout will be repaired as time goes on. To test, use disklabel -d <drive> and validate that the bounds do not overlap any boot blocks. This same information is used by disklabel -A... OK for the concept from krw, miod, and drahn
2009-06-04in case a handling a +groupname:*:: entry fails due to lack of memory,Ingo Schwarze
do not just skip the entry, but report the error condition; ok millert@
2009-06-03Ensure there is a statement after a label.Jonathan Gray
ok deraadt@
2009-06-03Take advantage of the surprise libc bump to bring inIngo Schwarze
YP group(5) exclusion, i.e. support -groupname:*:: in /etc/group. Such groups will be excluded from later +:*::, in just the same was as it is already done for passwd(5). I have been running this since the autumn of 2008. Discussed with several (including deraadt@, millert@, jmc@).
2009-06-02tweak previous;Jason McIntyre
2009-06-01Split getpw{nam,uid} off into their own man page. Hopefully, thisTodd C. Miller
will help people understand that endpwent() is not normally needed. OK deraadt@ jmc@
2009-04-29document that bogus lines are silently ignoredTheo de Raadt
ok millert
2009-04-29Remove the stderr spray balony. Library functions should indicate failureTheo de Raadt
(and libc and some others can use errno to indicate more detailed results). They should not print trash to stderr, let alone assume that stderr is open to the place they think it is. ok millert
2009-04-21remove from gen so that lint doesn't check gen if assembly versionsMartynas Venckus
are available. spotted by theo
2009-04-19- ldexp implementation has issues. switch to the one from libmMartynas Venckus
- remove frexp in hppa64, cloned from hppa - move generic ieee754 implementations of modf and ldexp to gen ok kettenis@, "looks good" millert@
2009-03-27supplement previous: add /etc/netid to FILES section; ok jmc@, ajacoutot@Ingo Schwarze
2009-03-27getgrouplist: If YP is #defined and enabled in /etc/group(5) and /etc/netid(5)Ingo Schwarze
contains a matching entry, use that and refrain from accessing YP. getpwnam/getpwuid: If YP is #defined and /etc/master.passwd(5) contains a matching entry before the first YP entry, use that and stay away from YP. Taken together, this allows a solution to the following problem pointed out by deraadt@: When YP was configured but temporarily unavailable, even root login would block, hindering you when trying to do repairs. To avoid this, you can now provide a static entry for root in /etc/netid. Using suggestions from miod@ otto@ blambert@ jmc@. "commit" deraadt@, "cool" ajacoutot@, "looks fine" jmc@.
2009-03-23add a HISTORY section to fts(3).Igor Sobrado
diff proposed by an anonymous user on bugs@; tweaked by jmc@; verified using the superb 4BSD collection at pdp-11.org.ru (thanks form@). ok jmc@
2009-03-05Add glob(7) and refer to it. OK jmc@ sobrado@Todd C. Miller
2009-02-18Add missing braces. This is why we use braces for indented block thatTodd C. Miller
are more than a couple of lines...
2009-02-11Avoid level going negative on deep (i mean really deep) dirs. ReportedOtto Moerbeek
by Maksymilian Arciemowicz. ok kettenis@ millert@
2009-01-15Remove support for kerb4 '.' instance separator, kerb4 is dead. OK jacekm@Todd C. Miller
2008-12-27Fix file descriptor leak in fts_children(); okay dhill@, millert@,Pedro Martelletto
tedu@, thib@.
2008-12-23ddb.console does not override machdep.kbdreset, so don't say it does;Jason McIntyre
2008-12-12- document and mlink frexpf, ldexpf, modff added 13 years agoMartynas Venckus
- document frexpl, ldexpl added recently a tweak and ok jmc@
2008-12-10use sys/cdefs.h; pointed out by theoMartynas Venckus
2008-12-09ditto frexpl and ldexplMartynas Venckus
2008-12-09- add long double signbitMartynas Venckus
- make long double versions weak aliases to double versions, on archs where long doubles are 64 bits - no need to have two finites. finite() and finitef() are non-standard 3BSD obsolete versions of isfinite. remove from libm. make them weak_alias in libc to __isfinite and __isfinitef instead. similarly make 3BSD obsolete versions of isinf, isinff, isnan, isnanf weak_aliases to C99's __isinf, __isinff, __isnan, __isnanf - bump major ok millert@
2008-11-09tweak previous;Jason McIntyre
2008-11-08Document the ddb.trigger sysctl.Chris Kuethe
feedback and ok mpf@, deraadt@
2008-10-24some SEE ALSO additions from Ingo Schwarze;Jason McIntyre
2008-10-22man page for Makefile.yp, and associated bits; from Ingo SchwarzeJason McIntyre
ok deraadt
2008-10-19document fts_open error handling; from Tim van der MolenJason McIntyre
ok millert
2008-10-02simplify and clarify login_getstyle; ok deraadt@Todd C. Miller
2008-10-01POSIX character class support for fnmatch(3) and glob(3). OK deraadt@Todd C. Miller
2008-09-07- replace dtoa w/ David's gdtoa, version 2008-03-15Martynas Venckus
- provide proper dtoa locks - use the real strtof implementation - add strtold, __hdtoa, __hldtoa - add %a/%A support - don't lose precision in printf, don't round to double anymore - implement extended-precision versions of libc functions: fpclassify, isnan, isinf, signbit, isnormal, isfinite, now that the ieee.h is fixed - separate vax versions of strtof, and __hdtoa - add complex math support. added functions: cacos, casin, catan, ccos, csin, ctan, cacosh, casinh, catanh, ccosh, csinh, ctanh, cexp, clog, cabs, cpow, csqrt, carg, cimag, conj, cproj, creal, cacosf, casinf, catanf, ccosf, csinf, ctanf, cacoshf, casinhf, catanhf, ccoshf, csinhf, ctanhf, cexpf, clogf, cabsf, cpowf, csqrtf, cargf, cimagf, conjf, cprojf, crealf - add fdim, fmax, fmin - add log2. (adapted implementation e_log.c. could be more acruate & faster, but it's good enough for now) - remove wrappers & cruft in libm, supposed to work-around mistakes in SVID, etc.; use ieee versions. fixes issues in python 2.6 for djm@ - make _digittoint static - proper definitions for i386, and amd64 in ieee.h - sh, powerpc don't really have extended-precision - add missing definitions for mips64 (quad), m{6,8}k (96-bit) float.h for LDBL_* - merge lead to frac for m{6,8}k, for gdtoa to work properly - add FRAC*BITS & EXT_TO_ARRAY32 definitions in ieee.h, for hdtoa&ldtoa to use - add EXT_IMPLICIT_NBIT definition, which indicates implicit normalization bit - add regression tests for libc: fpclassify and printf - arith.h & gd_qnan.h definitions - update ieee.h: hppa doesn't have quad-precision, hppa64 does - add missing prototypes to gdtoaimp - on 64-bit platforms make sure gdtoa doesn't use a long when it really wants an int - etc., what i may have forgotten... - bump libm major, due to removed&changed symbols - no libc bump, since this is riding on djm's libc major crank from a day ago discussed with / requested by / testing theo, sthen@, djm@, jsg@, merdely@, jsing@, tedu@, brad@, jakemsr@, and others. looks good to millert@ parts of the diff ok kettenis@ this commit does not include: - man page changes
2008-08-25correct +name handling; schwarze@usta.deTheo de Raadt
2008-08-23add missing header needed by asprintf().Charles Longeau
ok otto@ deraadt@
2008-08-22mention machine/cpu.h for the CPU identifiers.Brad Smith
2008-08-22After spotting a + record, continue scanning and pick up later groupsTheo de Raadt
in the file. Problem spotted by drahn. ok millert
2008-07-29tweak previous;Jason McIntyre
2008-07-29removeMartynas Venckus
2008-07-29- man pages for fpclassify, isfinite, isinf, isnan, isnormal, signbit,Martynas Venckus
mostly from freebsd - also describe deprecated aliases for isinff, isnanf, finite, finitef - describe behavior on vax - add mlinks for finite, finitef, isfinite, isinf, isinff, isnan, isnanf, isnormal, signbit - add man pages for isgreater, isgreaterequal, isless, islessequal, islessgreater, isunordered; from freebsd looked over by jmc@, it's better for him to work on when they are in tree
2008-07-28some SEE ALSO fixes;Jason McIntyre