summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix security bugs with a "new approach", using stdio's powerful bufferpeter1995-09-151-18/+86
| | | | | | | | control hooks. It is similar to an unrolled multi-part snprintf(), in that a "FILE *" is attached to a string buffer. There is also an optimisation for the case where the syslog format string does not contain %m, which should improve performance of "informational" logging, like from ftpd.
* Indicate that backlog limit is 32.dg1995-09-151-1/+1
|
* Add missing internal object functions, hard-coded for ncurses for now.paul1995-09-131-0/+18
|
* Back out that last change; we don't build this shared.dg1995-09-061-2/+0
|
* Bumped shared lib rev to 2.1.dg1995-09-061-0/+2
|
* getgrent.c: adjust _nextypgroup() slightly so that it continues processingwpaul1995-09-052-4/+10
| | | | | | | | | | | | | the group map after encountering a badly formatted entry. getpwent.c: same as above for _nextyppass(), and also turn a couple of sprintf()s into snprintf()s to avoid potential buffer overruns. (The other day I nearly went mad because of a username in my NIS database that's actually 9 characters long instead of 8. Stuffing a 9-character username into an 8-character buffer can do some strange things.) (This reminds me: I hope somebody's planning to fix the buffer overrun security hole in syslog(3) before 2.1 ships.)
* Clear up a minor bogosity in yp_match(): we have YPMATCHCACHE turnedwpaul1995-09-021-5/+5
| | | | | | | | | on, which is fine, except that _yp_dobind() is called before we check the cache. The means we can return from the cache check (if we have a hit) without calling _yp_unbind(). We should do the cache check first and _then_ drop into the section that binds the server and does the yp_match query.
* getpwent.c: turn the code that checks the override caches into awpaul1995-09-023-74/+79
| | | | | | | | | | | | | seperate function to avoid duplication. Also fix getpwent() a small bit to properly handle the case where the magic NIS '+' entry appears before the end of the password file. getgrent.c: be a little more SunOS-ish. Make it look like the NIS group map is 'inserted' at the the point(s) where the magic NIS '+' entry/entries appear. getgrent: fix a file descriptor leak: remember to close the netgroup file after we determine that we're using NIS-only innetgr() lookups.
* Change my parse fix from 'return argc' to 'return 0'.ache1995-08-301-1/+1
| | | | Pointed by: davidg
* National date/time representation in syslog logfiles looks ugly,ache1995-08-291-2/+1
| | | | | change strftime to ctime. Logfiles must have default (english) date/time representation for access/view from various places.
* Brought in changes from rev 1.14.2.1 into main branch.dg1995-08-261-1/+10
|
* Remove the CFLAGS+=-I${CURDIR}/net that I previously added.peter1995-08-211-1/+0
| | | | | | Since Bruce changed the #include <res_config.h> to #include "res_config.h" this is no longer needed, and only makes the 'make' more verbose for no real reason.
* Define DEBUG as 1 instead of as nothing so that it doesn't conflict withbde1995-08-211-1/+1
| | | | -DDEBUG in libresolv/Makefile.
* Fix bogus include paths, some of which stopped libresolv from compiling.bde1995-08-216-14/+12
|
* Update the resolver part of libc to bind-4.9.3-beta24 level (from beta9p1)peter1995-08-209-215/+420
| | | | | | | | Note that this was done by selective patching from diffs, to not conflict with the 4.4bsd base code.. This was *not* a trivial task.. I have been testing this code (apart from cosmetic changes) in my libc for a while now. Obtained from: Paul Vixie <paul@vix.com>
* fgetline does not exist.. fgetln is in it's place. Correct the X-Ref.peter1995-08-181-1/+1
| | | | Noticed by: Brian Tao, Bruce Evans
* There is no such file as /usr/include/ufs/quota.h. There is a filejoerg1995-08-151-1/+1
| | | | | | | | | /usr/include/ufs/ufs/quota (#include <ufs/ufs/quota.h>) that seems to work ok though. Closes PR # docs/670: quotactl man page incorr... Submitted by: evans@scnc.k12.mi.us (Jeffrey Evans)
* Submitted by: Bill Fenner <fenner@parc.xerox.com>wpaul1995-08-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix for PR #510. The original problem was that __ivaliduser() was failing to grant access to a machine listed in a +@netgroup specified in /etc/hosts.equiv, even though the host being checked was most certainly in the +@netgroup. The /etc/hosts.equiv file in question looked like this: localhost +@netgroup The reason for the failure was had to do with gethostbyaddr(). Inside the __ivaliduser() routine, we need to do a gethostbyaddr() in order to get back the actual name of the host we're trying to validate since we're only passed its IP address. The hostname returned by gethostbyaddr() is later passed as an argument to innetgr(). The problem is that __icheckhost() later does a gethostbyname() of its own, which clobbers the buffer returned by gethostbyaddr(). The fix is just to copy the hostname into a private buffer and use _that_ as the 'host' argument that gets passed to innetgr(). And here I was crawling all over the innetgr() code thinking the problem was there. *sigh*
* Small NIS tweak: frob pw_error() a little so that it can say eitherwpaul1995-08-131-1/+8
| | | | | | | | | 'NIS information unchanged' or '/etc/master.passwd unchanged' depending on which was is being modified (conditional on -DYP). This is to save me the trouble of writing a whole other error routine (nis_error()?) for the upcoming changes to passwd and chpass.
* Forget to close fileache1995-08-112-0/+2
| | | | Submitted by: SANETO Takanori sanewo@strg.sony.co.jp
* Bump shlib minor because xdr_* functions have been enabled. Do NOTasami1995-08-091-1/+1
| | | | | | | | | | bump it again if something else is added before 2.2. The xdr_* functions are enabled only in the 2.2 (-current) branch so far. If that modification is moved to the 2.1 (-stable) branch, this one should, too. Reviewed by: the mailing lists
* Fix _listmatch() so that it doesn't fall off the end of the list string.wpaul1995-08-081-6/+5
|
* Fix manpage to reflect current sourcesache1995-08-071-21/+49
|
* Restore %s format support from previous versionache1995-08-071-1/+22
|
* Just when you thought it was safe...wpaul1995-08-073-40/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - getnetgrent.c: address some NIS compatibility problems. We really need to use the netgroup.byuser and netgroup.byhost maps to speed up innetgr() when using NIS. Also, change the NIS interaction in the following way: If /etc/netgroup does not exist or is empty (or contains only the NIS '+' token), we now use NIS exclusively. This lets us use the 'reverse netgroup' maps and is more or less the behavior of other platforms. If /etc/netgroup exists and contains local netgroup data (but no '+'). we use only lthe local stuff and ignore NIS. If /etc/netgroup exists and contains both local data and the '+', we use the local data nd the netgroup map as a single combined database (which, unfortunately, can be slow when the netgroup database is large). This is what we have been doing up until now. Head off a potential NULL pointer dereference in the old innetgr() matching code. Also fix the way the NIS netgroup map is incorporated into things: adding the '+' is supposed to make it seem as though the netgroup database is 'inserted' wherever the '+' is placed. We didn't quite do it that way before. (The NetBSD people apparently use a real, honest-to-gosh, netgroup.db database that works just like the password database. This is actually a neat idea since netgroups is the sort of thing that can really benefit from having multi-key search capability, particularly since reverse lookups require more than a trivial amount of processing. Should we do something like this too?) - netgroup.5: document all this stuff. - rcmd.c: some sleuthing with some test programs linked with my own version of innetgr() has revealed that SunOS always passes the NIS domain name to innetgr() in the 'domain' argument. We might as well do the same (if YP is defined). - ether_addr.c: also fix the NIS interaction so that placing the '+' token in the /etc/ethers file makes it seem like the NIS ethers data is 'inserted' at that point. (Chances are nobody will notice the effect of this change, which is just te way I like it. :)
* Install non-source files with the optional flag ${COPY}, not with the flag -c.bde1995-08-062-3/+3
|
* Install source files with the -c flag, not with the optional flag ${COPY}.bde1995-08-065-13/+13
|
* Change `install' to `${INSTALL}' so that default install flags can bebde1995-08-0610-19/+20
| | | | | | | specified in the top level Makefiles. Previously I missed dozens of Makefiles that skip the install after using `cmp -s' to decide that the install isn't necessary.
* Fix default %c to be ctime-compatible as supposed (by Solaris too)ache1995-08-061-4/+4
|
* Only build libtelnet if the secure libtelnet is not going to be built.markm1995-08-061-1/+5
| | | | Reviewed by: rgrimes
* Remove _set_ospeed, it is done in tgetent nowache1995-08-052-6/+0
| | | | Remove ospeed redefinition from header file
* Do a little trick which covers 99% cases: initialize ospeedache1995-08-057-48/+53
| | | | | | | variable directly in tgetent by stderr or stdout output speed. It helps hide in non-standard __set_ospeed function and remove it from other sources (coming soon). Do prototype cleanup too.
* The European Commission went out and invented a new sort of summer-timewollman1995-08-053-224/+321
| | | | | | changeover, so we have to extend the format of timezone files (in a backward- compatible way, of course). This probably means that libc needs a minor version number bump before 2.2 is released (or maybe not).
* Don't depend on bogusly-installed <tzfile.h>.wollman1995-08-051-1/+1
|
* Fix cut&paste error: LC_COLLATE should be LC_TIMEache1995-08-051-3/+3
|
* Add time locale loadingache1995-08-051-0/+8
|
* Move rtprio.2 from usr.sbin/rtprio to lib/libc/sys, overwriting the bogusbde1995-08-051-28/+42
| | | | | | version in the latter directory. Reviewed by: davidg
* Fix sh coredump in vi mode with empty colon commandache1995-08-041-0/+3
|
* Implement locale-sensitive strftime () from ADO (heavily modifiedwollman1995-08-043-106/+254
| | | | | | | | | | by me). This probably loses for multibyte characters, but I have no way of telling. I'll let ache decide whether to add this support to startup_setlocale. Note that for this to make any sense at all, the symlinks in /usr/share/locale must go. (For the moment, this doesn't make any difference since there are no locales supplied.) Obtained from: Arthur David Olson <ado@elsie.nci.nih.gov>
* Allow any speeds in baudrateache1995-08-041-2/+6
|
* Add SA_RESTART to ^Z reaction, EIO was returned in other caseache1995-08-041-0/+3
|
* Simplify baud printing codeache1995-08-041-84/+1
|
* Nuke local termcap.h and use system oneache1995-08-042-4/+4
|
* Remove libftp from Makefilejkh1995-08-041-1/+1
|
* Eliminate ospeed switch with new _set_ospeedache1995-08-041-28/+1
|
* Add non-standard function: _set_ospeed(speed)ache1995-08-044-6/+89
| | | | | | | | | Basically all termios+termcap pgms needs it. It set ospeed variable using nearest-matched stty speeds, which helps termcap pgms works with non-fixed termios speeds and not duplicate ospeed switch into every pgm. Also it isn't standard function, its source code is too big to include it in whole to every termcap+termios pgm.
* Reviewed by: David Greenmanwpaul1995-08-021-14/+4
| | | | | | | | | | | | | | | Back out the 'help NIS rebind faster' hack. This change used a connect()/send() pair rather than the original sendto() to allow RPC to pass ICMP host unreachable and similar errors up to RPC programs that use UDP. This is not a terrible thing by itself, but it can cause trouble in environments with multi-homed hosts: if the portmapper on the multi-homed machine sends a reply with a source address that's different than the one associated with the connection by connect(), the kernel will send a port unreachable message and drop the reply. For the sake of compatibility with everybody else on the planet, it's best to revert to the old behavior. *long, heavy sigh*
* Make strtod conforms manpage, use isspace to skip initial whitespacesache1995-08-011-7/+3
| | | | instead of hardcoded whitespaces
* Similar changes like in strtol, all this family is VERY brokenache1995-08-015-5/+15
| | | | in 8bit environment (isalpha at the end of digits)
* strtol and atoi VERY broken in 8bit chars locale, i.e. if you pass somethingache1995-08-011-1/+3
| | | | | | like 38400<any 8bit char, isalpha> it not detect this stuff and produce very big number instead. Fixed by operating with unsigned char and checking for isascii. (secure/telnetd hits by it f.e.)
OpenPOWER on IntegriCloud