summaryrefslogtreecommitdiffstats
path: root/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* various MLINK fixes from Alan R. S. Bueno;jmc2009-08-132-5/+5
|
* define substitution in some cases might happen after prototypes aremartynas2009-08-071-39/+39
| | | | | already pulled; so manually substitute protos ensuring they will always be right; ok millert@
* must include <sys/types.h> before including <login_cap.h> or <bsd_auth.h>;schwarze2009-07-152-4/+6
| | | | | noticed by joao <salvatti at gmail dot com> on tech@; feedback and ok kettenis@ deraadt@ and reminded by jmc@
* Load symbol address with dla, not la; good thing userland is still limitedmiod2009-07-131-2/+2
| | | | to 2GB of vm space.
* fwrite() should also return 0 if either size or nmemb are 0.millert2009-07-123-8/+22
| | | | Adapted from FreeBSD. OK deraadt@
* promote correct style for error checkingeric2009-07-093-15/+15
| | | | ok tedu@ deraadt@ krw@
* getgrouplist(3) used to and ought to return 0 on success;schwarze2009-06-232-9/+17
| | | | | fixing a regression introduced in rev. 1.16 spotted by otto@; ok millert@ otto@
* fix rcs ids. ok sthen@martynas2009-06-211-1/+1
|
* abs conforms c99 -> imaxabs conforms c99. ok millert@martynas2009-06-211-3/+3
|
* YP client functions do not allocate memory when they fail;schwarze2009-06-121-3/+4
| | | | wording tweaked by jmc@
* don't use freelist if it overruns; use heap memory instead notmartynas2009-06-111-2/+6
| | | | | trying to allocate large blocks from bss memory pool in this case. problem reported by Maksymilian Arciemowicz. ok otto@, millert@
* document KERN_BUFCACHEPERCENT and KERN_MAXLOCKSPERUID; help/ok ogajmc2009-06-091-2/+10
|
* quieten compiler by converting pointers to uintptr_t before truncating themderaadt2009-06-081-5/+5
| | | | | to u_int32_t to do integer math with (in a situation where that is legit) ok otto millert
* de-spaghetti:schwarze2009-06-071-36/+20
| | | | | | | | | | 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@
* fix a minor memory leak spotted by deraadt@; ok millert@ deraadt@schwarze2009-06-071-8/+6
|
* Add KERN_FILE2 sysctl analogous to KERN_PROC2 but for file structures,millert2009-06-071-2/+12
| | | | | along with vnode type-specific info to make it more useful for fstat(1). OK deraadt@
* Modify the uc_entries allocation check such that the lhs is a constant.millert2009-06-071-2/+2
| | | | OK deraadt@
* No need to malloc, copy, have a single read access, and free right away.schwarze2009-06-071-18/+6
| | | | | | Thus, garbage collect one variable, one strdup, one free, two ifs, one else and a couple of assignments. No functional change. ok millert@
* In case of memory exhaustion, ypmatch_add may both leak memory and leaveschwarze2009-06-061-36/+28
| | | | | | invalid data on the list, inviting later NULL pointer access. noticed by deraadt@, algorithm proposed by millert, implemented by me; feedback and ok millert@
* correct error codes after malloc(3) failure, as 0 means RPC_SUCCESS;schwarze2009-06-061-3/+3
| | | | noticed by and OK deraadt@, ok millert@
* use calloc() and realloc() more; ok schwarzederaadt2009-06-062-21/+13
|
* Note that f_fsid gets cleared when caller is not the superuser. OK deraadt@millert2009-06-052-4/+12
|
* use calloc() to provide size * nitems safetyderaadt2009-06-051-3/+2
|
* use calloc() to provide size * nitems safety; ok millertderaadt2009-06-051-3/+2
|
* The yp_bind(3) return code now distinguishes "YP not active" from "an errorschwarze2009-06-051-63/+60
| | | | | | | | | 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@
* malloc(3) failure should raise YPERR_RESRC, not YPERR_YPERR;schwarze2009-06-051-3/+3
| | | | ok millert@
* improve yp_bind(3) error reporting after clnttcp_create(3) failure:schwarze2009-06-051-3/+10
| | | | | | map ECONNREFUSED -> YPERR_YPBIND, ENOMEM -> YPERR_RESRC, else YPERR_YPERR while here, malloc(3) failure should raise YPERR_RESRC, not YPERR_YPERR ok millert@
* When parsing a line stating with "+" or "-" in group(5),schwarze2009-06-051-62/+51
| | | | | | | | | 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@
* An empty sting cannot be used as a YP domain name,schwarze2009-06-051-1/+3
| | | | | so treat it similarly to a failing call to getdomainname. ok millert@
* abort any time adjustment in progress if the clock is set with settimeofdayckuethe2009-06-051-2/+5
| | | | ok millert
* compare and shift buffer against a fixed length not strlen derived values.pyr2009-06-051-6/+6
| | | | ok otto@
* simplify the 'family' option parser and make it more evident what we'repyr2009-06-042-25/+18
| | | | | | now doing. ok deraadt@
* Recycle four ancient fields in the disklabel structure, replacing them withderaadt2009-06-041-4/+0
| | | | | | | | | | | | 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
* fix two obvious typosschwarze2009-06-041-4/+4
|
* Don't assume that we can overwrite strings in the environment.millert2009-06-041-1/+3
| | | | | Someone may have passed a read-only string to putenv() (I'm looking at you cron!).
* Add a resolv.conf option to specify the order in which getaddrinfopyr2009-06-042-8/+63
| | | | | | | | | | | PF_UNSPEC queries are made. While there change the default from inet6 first then inet4 to inet4 first then inet6, this prevents the many people with IPv4 only connectivity from constantly trying to contact IPv6 addresses, and also unbreaks many ports who don't use getaddrinfo right. ok deraadt@, plenty of cheering in the room wrt the idea, not loud enough complaining from the v6 crowd.
* in case a handling a +groupname:*:: entry fails due to lack of memory,schwarze2009-06-041-2/+3
| | | | | do not just skip the entry, but report the error condition; ok millert@
* Proper error handling in clntraw_create:schwarze2009-06-041-6/+15
| | | | | | Bail out and clean up after all errors, and report in libc/rpc style. Among others, this fixes a NULL pointer dereference in clntraw_call. Feedback and ok kjell@ and millert@.
* State that clnt{raw,udp}_create can fail.schwarze2009-06-031-2/+8
| | | | "no objection" millert@
* Ensure there is a statement after a label.jsg2009-06-031-1/+2
| | | | ok deraadt@
* crank libc majorderaadt2009-06-031-2/+2
|
* Take advantage of the surprise libc bump to bring inschwarze2009-06-037-71/+171
| | | | | | | | 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@).
* Make putenv(), setenv() and unsetenv() standards compliant. Themillert2009-06-035-86/+117
| | | | | | standard explicitly disallows passing setenv a name with a '=' in it but historic BSD behavior is to allow this but to ignore the '=' and anything after it.
* Arla client rename from xfs to nnpfs for later upgrades. Tested on various arches. ok todd@ beck@jj2009-06-032-4/+4
|
* Don't postpone memory allocation for the error message to the error handler:schwarze2009-06-031-33/+14
| | | | | | | That way, memory exhaustion simply cannot be reported because it would require to... allocate memory. Instead, really use a statical buffer as it is advertised in the manual. "looks good" millert@
* Set errno to EINVAL when fgets is given a non-positive size.ray2009-06-022-4/+11
| | | | OK millert otto
* - define EAI_OVERFLOW, as per IEEE Std 1003.1-2001(Interpretation #13)jasper2009-06-022-3/+7
| | | | hint from claudio@, ok millert@
* When authnone_create fails, do not leave behind a NULL cl_auth attribute,schwarze2009-06-022-3/+13
| | | | | | because that one will typically derefenced later without any checking. Instead, flag the error condition and bail out cleanly. useful feedback from kjell@ and ok millert@
* make the documentation of {svc,clnt}*create complete and correctschwarze2009-06-022-10/+21
| | | | ok millert@ jmc@
* tweak previous;jmc2009-06-022-8/+9
|