summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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.)
* Null terminate all strings returned by the dummy uname() routine,mpp1995-07-312-18/+26
| | | | | | | and make sure that the version string is somewhat sane. This closes out PR#462. Reviewed by: Bruce Evans
* bkr() returns an int, and not a pointer. Document this.joerg1995-07-231-3/+3
| | | | | | | | Closes PR #pending/630. Pointed out by: phk Obtained from:
* Add missing entries for 38400/57600/115200 bauds to tmspc10[]ache1995-07-231-1/+2
|
* Confirmed to work by: rcarter@geli.com (Russell Carter)bde1995-07-221-4/+1
| | | | | Enable xdr_float.c. I believe it works on i386's although it isn't portable enough to be in a machine-independent directory.
* Slight adjustment to previous fix for __ivaliduser(). It was checking forpeter1995-07-161-2/+4
| | | | | | | | the comment before checking for long lines, so there was a possibility that the wrap-around might be used as an exploitable hostname. Reviewed by: Submitted by: Obtained from:
* Make ruserok() accept the #-starting comment lines we used to havejoerg1995-07-161-0/+2
| | | | | | in our default /etc/hosts.equiv. Closes PR #conf/620: Default /etc/hosts.equiv...
* The declaration of sigaction was missing a `const'.bde1995-07-161-1/+1
|
* Fix the synopsis of signal() again. Now it is uglier but correct.bde1995-07-161-2/+2
| | | | | (Declarations of signal that don't use typedefs can't be formatted in the standard man page form.)
* Change this to do what it should have done from the start.phk1995-07-127-41/+59
| | | | | Add argument for buffer for output. Fix manuals.
* Fix the prototypes for getservby{name,port}().joerg1995-07-091-2/+2
| | | | | | Closes PR #docs/568: minor manpage bug Submitted by: Michael Smith (email address no longer valid)
* The ypprot_err() function incorrectly maps YP_NODOM to YPERR_NODOM.wpaul1995-07-051-2/+2
| | | | | | | | | | | | Strange as it sounds, it should map to YPERR_DOMAIN instead. The YP_NODOM protocol error code is generally returned by ypserv when you ask it for data from a domain that it doesn't support. By contrast, the YPERR_NODOM error code means 'local domain name not set.' Consequently, this incorrect mapping leads to yperr_string() generating a very confusing error message. YPERR_DOMAIN says 'couldn't bind to a server which serves this domain' which is much closer to the truth.
* Numerous Makefile fixes:wollman1995-06-301-11/+30
| | | | | | | | 1) Do dependencies. 2) Install all appropriate links to manual pages. 3) Install header file in `beforeinstall' like all the rest. 4) Install header file only if changed. 5) Install object files only if changed.
* Change ld.so to correctly load dependant libraries for dlopen and unload themdfr1995-06-272-4/+16
| | | | | | | | | | | | | | | | | on dlclose. Also correctly call constructors and destructors for libraries linked with /usr/lib/c++rt0.o. Change interpretation of dlopen manpage to call _init() rather than init() for dlopened objects. Change c++rt0.o to avoid using atexit to call destructors, allowing dlclose to call destructors when an object is unloaded. Change interface between crt0 and ld.so to allow crt0 to call a function on exit to call destructors for shared libraries explicitly. These changes are backwards compatible. Old binaries will work with the new ld.so and new binaries will work with the old ld.so. A version number has been introduced in the crt0-ld.so interface to allow for future changes. Reviewed by: GAWollman, Craig Struble <cstruble@singularity.bevc.blacksburg.va.us>
* Do the same sanity checking in _pw_breakout_yp() that we do inwpaul1995-06-261-16/+19
| | | | | | | _gr_breakout_yp(): if we encounter a NULL pointer generated as the result of a badly formatted NIS passwd entry (e.g. missing fields), we punt and return an error code, thereby silently skipping the bad entry.
* Fix for a potential problem reported by a user I bumped into on IRCwpaul1995-06-261-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | last night: _gr_breakout_yp() doesn't check for badly formatted NIS group entries. For example, a bogus entry like this: bootp::user1,user2,user3 will lead to a null pointer dereference and a SEGV (note that the GID field is missing -- this results in one of the strsep(&result, ":") returning NULL). The symtpom of this problem is programs dumping core left and right the moment you add a + entry to /etc/group. Note that while this is similar to an earlier bug, it's caused by a different set of circumstances. The fix is to check for the NULL pointers and have _gr_breakout_yp() punt and return a failure code if it catches one. This is more or less the behavior of SunOS: if a bad NIS group entry is encountered, it's silently ignored. I don't think our standard (non-NIS) group parsing code behaves the same way. It doesn't crash though, so I'm citing the 'it ain't broken, don't fix it' rule and leaving it alone. I'll probably have to add similar checks to _pw_breakout_yp() in getpwent.c to ward off the same problems. It's rare that bad NIS map entries like this occur, but we should handle them gracefully when they do.
* 41 headers must be implicitly included and one more (<sys/param.h>) mustbde1995-06-251-1/+2
| | | | be explicitly included before kvm_getprocs() can be used.
* Update the man page for kvm_getprocs.3 to reflect our sysctl-basedjoerg1995-06-241-9/+9
| | | | | | kvm mechanism. Submitted by: (Vic Abell) <abe@cc.purdue.edu>
* Fixes for PR #508 and #509 ('botched 'Bad netgroup' error message' andwpaul1995-06-231-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'cycle in netgroup check too greedy'). PR #508 is apparently due to an inconsistency in the way the 4.4BSD netgroup code deals with bad netgroups. When 4.4BSD code encounters a badly formed netgroup entry (e.g. (somehost,-somedomain), which, because of the missing comma between the '-' and 'somedomain,' has only 2 fields instead of 3), it generates an error message and then bails out without doing any more processing on the netgroup containing the bad entry. Conversely, every other *NIX in the world that usees netgroups just tries to parse the entry as best it can and then silently continues on its way. The result is that two bad things happen: 1) we ignore other valid entries within the netgroup containing the bogus entry, which prevents us from interoperating with other systems that don't behave this way, and 2) by printing an error to stderr from inside libc, we hose certain programs, in this case rlogind. In the problem report, Bill Fenner noted that the 'B' from 'Bad' was missing, and that rlogind exited immediately after generating the error. The missing 'B' is apparently not caused by any problem in getnetgrent.c; more likely it's getting swallowed up by rlogind somehow, and the error message itself causes rlogind to become confused. I was able to duplicate this problem and discovered that running a simple test program on my FreeBSD system resulted in a properly formatted (if confusing) error, whereas triggering the error by trying to rlogin to the machine yielded the missing 'B' problem. Anyway, the fixes for this are as follows: - The error message has been reformatted so that it prints out more useful information (e.g. Bad entry (somehost,-somedomain) in netgroup "foo"). We check for NULL entries so that we don't print '(null)' anymore too. :) - Rearranged things in parse_netgrp() so that we make a best guess at what bad entries are supposed to look like and then continue processing instead of bailing out. - Even though the error message has been cleaned up, it's wrapped inside a #ifdef DEBUG. This way we match the behavior of other systems. Since we now handle the error condition better anyway, this error message becomes less important. PR #507 is another case of inconsistency. The code that handles duplicate/circular netgroup entries isn't really 'too greedy; -- it's just too noisy. If you have a netgroup containing duplicate entries, the code actually does the right thing, but it also generates an error message. As with the 'Bad netgroup' message, spewing this out from inside libc can also hose certain programs (like rlogind). Again, no other system generates an error message in this case. The only change here is to hide the error message inside an #ifdef DEBUG. Like the other message, it's largely superfluous since the code handles the condition correctly. Note that PR #510 (+@netgroup host matching in /etc/hosts.equiv) is still being investigated. I haven't been able to duplicate it myself, and I strongly suspect it to be a configuration problem of some kind. However, I'm leaving all three PRs open until I get 510 resolved just for the sake of paranoia.
* Fix handling NULL-encapsulated interfaces (lo & tun)ache1995-06-221-3/+12
| | | | | Reviewed by: wollman Submitted by: dvv@sprint.net
* Don't cast void functions to void.hsu1995-06-204-7/+7
| | | | Obtained from: NetBSD commit by jtc on June 16, 1995.
OpenPOWER on IntegriCloud