summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* _thread_kern_sig_unblock takes an integer, not a reference.alex1996-12-291-2/+2
| | | | Submitted by: John Birrell <jb@cimlogic.com.au>
* Add comment that range checking is already done at upper levelache1996-12-283-4/+9
| | | | | | Kill snprintf left in collate.c from previous backout Should go in 2.2
* Small yet significant tweaks/cleanups:wpaul1996-12-273-10/+14
| | | | | | | | | | | | | | | | | | - getpwent: o adjunctbuf should be NUL terminated after copying o _pw_breakout_yp() needs to know the length of the buffer returned from YP so it can properly NUL terminate its local buffer. - getgrent: o YP buffers should be YPMAXRECORD + 2 bytes long and NUL terminated. (Previously they were hardcoded to 1024 bytes.) - getnetgrent: o YP data should be copied with snprintf(), not sprintf() These are 2.2 candidates. I will wait a few days to make sure these don't break anything and then, if there are no objections, move them to the 2.2 branch.
* Small yet significant tweaks/cleanups:wpaul1996-12-275-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | - getservent: o put _yp_check() proto under #ifdef YP where it belongs o local YP buffers should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying - gethostbynis: o local YP buffer should be YPMAXRECORD + 2 bytes long - getnetbynis: o local YP buffer should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying - ether_addr: o local YP buffers should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying (in this case it's BUFSIZ + 2 bytes, but it happens that BUFSIZ == YPMAXRECORD. - gethostbydns: o nuke stray 'return(NULL)' in __dns_getanswer() (harmless but looks silly) These are 2.2 candidates. I will wait a few days to make sure these don't break anything and then, if there are no objections, move them to the 2.2 branch.
* Make a note in the standards section that sysconf isn't completelyalex1996-12-271-2/+3
| | | | POSIX conforming.
* Use dynamic allocated buffers instead static buffers. No member orwosch1996-12-251-19/+91
| | | | | | | | | | | | | | | | | line length limit anymore - now 500 members or 5000 members are possible. For security group lines longer than 256K will be count as an error. 256K should be enough for 65536 users. Support comments (lines that begin with a #) if compiled with option -DGROUP_IGNORE_COMMENTS. Fortunately it seems that all system utilities which use getgrent() functions are dynamically linked executables. So you need only rebuild libc.so.3.0 if you want this change. Note: if you have an old X server which depend on libc.so.2.* you should rebuild libc.so.2.* too. Not a 2.2 candidate.
* Another one-liner: remember to NUL terminate local copy of NIS hostwpaul1996-12-241-2/+3
| | | | | | | | | | lookup results. Without this, doing multiple host/addr lookups in a single process yeilds strange results (the buffer is static, and garbage may be left behind from previous lookups). I just noticed this in 2.2-BETA. Unless somebody threatens to chop my hands off with an axe, I'm going to move this to the 2.2-RELENG branch shortly.
* Make the __dns_getanswer() wrapper work right. For the newer versionswpaul1996-12-241-1/+14
| | | | | | | of BIND, we need to tweak some things to that gethostanswer() knows whether or not we're dealing with an IPv4 or IPv6 address. (This'll teach me to use a 2.1.0 system for NIS development -- but it's so nice and stable I just can't being myself to upgrade it. :)
* comma typoswosch1996-12-237-15/+21
|
* Add __dns_getanswer() hook to allow access to the gethostanswer()wpaul1996-12-221-1/+11
| | | | functions from outside libc. (Needed for async DNS resolver in ypserv.)
* Back out rev 1.5: the overflow condition is already handled elsewhere.joerg1996-12-221-2/+4
|
* Speeling fix.davidn1996-12-221-1/+1
|
* Convert to mdoc format.mpp1996-12-214-178/+122
|
* Add a missing #ifdef YP/#endif pair so that this module willwpaul1996-12-211-0/+2
| | | | | | compile without -DYP. Pointed out by: Wolfram Schneider
* Fix for bug noticed by Christoph Kukulies.wpaul1996-12-201-2/+3
| | | | | | | | | | | | | | | | _yp_dobind() checks to see if a fork() happens (by checking PIDs) and invalidates all bindings if it finds itself in a newly created child process. (This avoids sharing RPC client handles and socket descriptors with the parent, which would be bad.) Unfortunately, it summarily calls clnt_destroy() on the handles, which may result in the destruction of a descriptor that isn't really a socket. This is fixed by replacing the explicit call to clnt_destroy() with a call to _yp_unbind(), which deals with potentially hosed socket descriptors an a safe manner. This is basically a one-liner. Once I confirm that it fixes Christoph's problem, I'd like permission to put it in the 2.2-RELENG branch.
* Back out change. The last argument to semctl() IS union semunswallace1996-12-181-1/+1
| | | | | for the C library call, which is a wrapper that passes it by reference to the kernel.
* Last argument to semctl() is union semun *, not union semun.jkh1996-12-171-2/+2
| | | | | Pointed-Out-By: swallace Person-With-Commit-Privs-By-Whom-It-Should-Have-Been-Committed: swallace
* Fix yet another buffer overflow. :-(joerg1996-12-162-9/+5
| | | | | | | | Vulnerable: all programs that use setlocale(LC_COLLATE), setlocale(LC_CTYPE), or setlocale(LC_ALL). The only setuid/setgid binary i've found for this is w(1). Should go into 2.2.
* Mention FreeBSD explicitly along with 4.2BSD so that thempp1996-12-151-2/+4
| | | | | | | | reader will know that this information does apply to FreeBSD also. Closes PR# 1618. This can go into 2.2.
* Correct some xrefs/mlinks.mpp1996-12-143-2/+7
|
* Merge Lite2 mods, and -Wall cleaning. undelete(2) cruftsteve1996-12-143-6/+21
| | | | | | not yet implemented is protected by a define (BSD4_4_LITE) that should be removed when this call is supported by the kernel.
* Fix the fix.joerg1996-12-131-1/+2
| | | | Pointed out by: wollman, bde
* Don't free the line buffer, since getttynam(3) might still referencejoerg1996-12-121-5/+4
| | | | | | | | it. Closes PR # bin/2196: Bug in src/libc/gen/gettty... Submitted by: davidn@blaze.net.au (David Nugent)
* Fix an embarassing and rather obscure incarnation of an uninitializedjoerg1996-12-121-1/+1
| | | | | | local variable use. Found by: actually using ascii2addr() :-/
* POSIX.4 defines MAP_FAILED to be the error return from mmap().alex1996-12-121-1/+1
|
* Get struct ether_addr directly from <net/ethernet.h> rather than pullingwollman1996-12-102-8/+4
| | | | | | in lots of unrelated junk from <net/if.h> and <net/if_ether.h>. These functions still aren't prototyped anywhere (but should be in <net/ethernet.h>---got that, Bill?).
* Change another reference to host names to domain names, and restore somempp1996-12-091-4/+3
| | | | | | changes that were lost. Pointed out by: bde
* English pedantry : affect -> effectmsmith1996-12-091-1/+1
| | | | Submitted by: Daniel O'Callaghan" <danny@panda.hilink.com.au>
* Turn POSIX_SAVED_IDS offache1996-12-061-20/+20
|
* I asked Bill Paul why _getnetbynis() was only being called with 2 parameters,jkh1996-12-061-3/+3
| | | | | | | | | | | | | | and he said: The 3rd agrument is new; looks like it was part of the upgrade to a new BIND with some IPv6 support. The third argument here should be AF_INET. In order for it to be anything else, I'd have to add new NIS functions to support IPv6 lookups. I don't even know what those look like yet. So there ya go, add AF_INET as the 3rd argument to the call. Submitted-by: wpaul
* Remove more instances of passing arrays by address when they shouldjkh1996-12-051-7/+7
| | | | | have simply been passed as arrays. In some cases, casts had even been added to remove the warnings generated by such misuse! Aieee!
* Eliminate 3 more examples of gratutiously passing arrays by address.jkh1996-12-051-3/+3
| | | | | Everyone please call ParaSoft today and say "I will buy 57 copies of Insure++ tomorrow, but first I want a FreeBSD version." :-)
* sethostname() returns int, not long. I could get used to having thisjkh1996-12-051-2/+2
| | | | | | | copy of insure++, too bad the runtime only works for BSD/OS. :-( Maybe they'll be so impressed by my initial 15 entry bug report for it that they'll take the FreeBSD version more seriously. :-) :-)
* _key is a char array and we don't need to pass its address to _buildkey()jkh1996-12-051-1/+1
| | | | when buildkey is expecting a char *.
* gethostname() returns int, not long. Answered my own question byjkh1996-12-051-1/+1
| | | | | RTFM'ing. Either both the header files and the man pages are wrong or this code is, and I'll take the majority decision. :-)
* make u_char * -> char * conversion explicit.jkh1996-12-051-1/+1
| | | | Found-By: insight's "insure++" tool.
* The semget man page uses the incorect symbol for altermpp1996-12-031-7/+7
| | | | | | access. Closes PR# 1712. Submitted by: Kent Vander Velden
* Add support for detecting and hopefully using the passwd.adjunct.bynamewpaul1996-12-031-13/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | NIS map which is present on SunOS NIS servers with the SunOS C2 security hack^Woption installed. I'm convinced that the C2 security option restricts access to the passwd.adjunct.byname map in the same way that I restrict access to the master.passwd.{byname,buid} maps (checking for reserved ports), which means that we should be able to handle passwd.adjunct.byname map correctly. If _havemaster() doesn't find a master.passwd.byname map, it will now test for a passwd.adjunct.byname map before defaulting back to the standard non-shadowed passwd.{byname,byuid} maps. If _pw_breakout_yp() sees that the adjunct map was found and the password from the standard maps starts with ##, it will try to grab the correct password field from the adjunct map. As with the master.passwd maps, this only happens if the caller is root, so the shadowing feature is preserved; non-root users just get back ##username as the encrypted password. Note that all we do is grab the second field from the passwd.adjunct.byname entry, which is designated to be the real encrypted password. There are other auditing fields in the entry but they aren't of much use to us. Also switched back to using yp_order() to probe for the maps (instead of yp_first()). The original problem with yp_order() was that it barfed with NIS+ servers in YP compat mode since they don't support the YPPROC_ORDER procedure. This condition is handled a bit more gracefully in yplib now: we can detect the error and just punt on the probing.
* upgrade STANDARDS from POSIX 1003.1-88 to 1003.1-90 using .St macrowosch1996-12-0228-91/+100
| | | | | | use ``is expected to conform to'' phrase, not ``conforms to'' Pointed out by: Bruce->NIST-PCTS
* Update getdomainname(3) to reflect that it operates onmpp1996-12-011-11/+13
| | | | | | | domain names and not host names. Pointed out by: bde Obtained from: NetBSD
* Add rcsid[]ache1996-11-271-13/+19
| | | | | | Since locale reading code not resistent against stack overflowing or similar intruder attacks, don't allow PATH_LOCALE env variable action for s-bit programs (non-standard locale path setting)
* Add Idache1996-11-261-35/+43
| | | | Optimize/improve recently added locale restoration on failure
* Move PATH_LOCALE handling to setlocale.c, simplify locale path building,ache1996-11-261-10/+9
| | | | don't treat empty encoding as C encoding
* PATH_LOCALE: use this non-standard env variable first time only, i.e.ache1996-11-263-72/+98
| | | | | | | | | | | | | | | | strdup() it to prevent unsetenv() or setenv() effects. Check its length to not allow user to overflow internal locale buffer. Move PATH_LOCALE handling code into one place. POSIX: make better stub for LC_MONETARY & LC_NUMERIC, now it check locale directory existance instead of refusing all non-C non-POSIX locales. POSIX treats empty locale env variable as unset variable while our old code treats it as "C" locale, fix it. Implement previous locale restoring, if locale setting fails. Old code assumes success if some of LC_ALL subset is successed even other fails, POSIX treats it as failure with previous locale restoring, fix it. Remove unneccessary length checking in currentlocale()
* get_myaddress() wasn't following the interface array properlypst1996-11-221-12/+9
| | | | Cannidate for: 2.2
* Fixed execvp() of an empty pathname to fail POSIXly. Previously itbde1996-11-181-0/+6
| | | | | | | attempted to exec the components of $PATH and it usually set errno to the wrong value. Found by: NIST PCTS
* Fixed uninitialized variables for the '/'-in-pathname case in execvp().bde1996-11-181-1/+2
| | | | | | | | Garbage in `eacces' caused the wrong errno to be set for non-EACCES errors. Garbage in `etxtbsy' caused a semi-random retry strategy for ETXTBSY errors. Found by: NIST-PCTS. gcc -Wall reported the problem, but -Wall is not enabled for libc.
* Slight rewording of the BUGS section.alex1996-11-131-4/+4
|
* Parameters for localtime_r() and gmtime_r() definitions changed.hsu1996-11-111-8/+8
| | | | | Parameters for pthread_getspecific() call changed. pthread_keycreate() renamed to pthread_key_create().
* Parameters pthread_getspecific() changed.hsu1996-11-111-1/+1
|
OpenPOWER on IntegriCloud