summaryrefslogtreecommitdiffstats
path: root/lib/libc/net
Commit message (Collapse)AuthorAgeFilesLines
* Add RCS Id and fix date.wollman1996-06-171-2/+3
|
* Cross-reference addr2ascii(3).wollman1996-06-171-3/+10
|
* Correct date and add $Id$ to reflect previous modification.wollman1996-06-171-2/+3
|
* Cross-reference addr2ascii(3) and inlcude a note about how thosewollman1996-06-171-2/+16
| | | | functions are preferred but are not widely available as yet.
* It would help if I actually added the source code for these routines.wollman1996-06-133-0/+377
|
* Add an independent implementation of addr2ascii(3) and ascii2addr(3)wollman1996-06-131-2/+5
| | | | following the API of the INRIA IPv6 implementation.
* Improve NIS performace of getservbyname() and getservbyport(). Both thesewpaul1996-06-013-7/+123
| | | | | | | | | | | | | | | | | | | | | | functions are implimented as wrappers around getservent(), which means it's up to getservent() to do all the work. The NIS support in getservent() only allows it to scan through the services.byname map one entry at a time until it finds the requested service name/port. This can be painfully slow due to the overhead involved (lots and lots of successive RPCs). To fix this, we allow getservbyname() and getservbyport() to signal getservent() that if NIS is turned on (there's a '+' in /etc/services), the usual yp_first()/yp_next() linear search should be abandoned and yp_match() used instead. This causes getservent() to immediately locate the requested entry instead of wasting time groping through the whole map. The downside is that this trick is accomplished by exporting a couple of pointers from getservent.c which getservbyname.c and getservbyport.c can preset in order to tell getservent() what to do. If all three functions were in the same source module, then the extra cruft could be delcared static to avoid poluting the global symbol space. Maybe they should be combined anyway. For now I've settled on prepending lots of underscores.
* Use the setsockopt for IP_PORTRANGE to cause rresvport() to allocate apeter1996-05-311-12/+24
| | | | | | | | | privileged port within a single bind(), rather than looping through attempts to bind over and over again over progressively lower ports. This should speed up rlogin/rsh etc, and will probably cure some of the strange rlogin hangs that have been reported in the past where rresvport() managed to bind() to a port address that it shouldn't have.
* Do not install the now unsupported netns and netisompp1996-04-082-4/+7
| | | | | related man pages. Comment out cross references to those man pages from other man pages.
* Correct some man page xrefs, and some other minor changes to bring somempp1996-04-081-1/+1
| | | | | | man pages up to mdoc guidelines and fix some minor formatting glitches. Also fixed a number of man pages to not abuse the .Xr macro to display functions and path names and a lot of other junk.
* Fix other half of problem reported in PR #1079: _getnetbynisaddr() iswpaul1996-03-231-12/+41
| | | | | | | | | | | | | | | | | broken. The translation from network number to ASCII string was not working correctly (you would sometimes get things like 0.244.0.0 instead of 244.0.0). Also copied results of yp_match() to a static buffer for consistency with gethostbynis.c. Note: _getnetbynisaddr() chops off trailing .0's, i.e. 244.0.0 is truncated to 244. By contrast, getnetbyht.c code (for local /etc/networks lookups) leaves the traling .0's in place. This means that the NIS and local file lookups will match different things when looking up the same network number. I'm not sure which is the correct behavior. (I think the DNS lookup code tries all combinations -- should the NIS and local host lookup routines do that too?)
* gethostbynis.c:wpaul1996-03-162-8/+19
| | | | | | | | | | | | | | | | | | - Fix problem described in PR #1079: _gethostbynisaddr() doesn't work. Make it accept the same arguments as all the other gethostby*addr() functions and properly convert the supplied IP address into a text string so that yp_match() can find it in the hosts.byaddr map. - Also fix potential memory leak: copy the results of yp_match() to a static buffer and free the result (yp_match() returns dynamically allocated memory). ether_addr.c: - Since I was in the neighborhood, fix ether_ntohost() and ether_hostton() so that they don't bogusly for a free(result) when yp_match() fails.
* Fix inet_network to not dump core if passed in an addressmpp1996-02-171-3/+1
| | | | | | with more than 4 octets (e.g. 1.2.3.4.5). Submitted by: Amy Baron <amee@beer.org> via NetBSD-bugs
* Fixed a bunch of man page cross references that werempp1996-02-152-2/+2
| | | | | | | | in the main text of various man pages. Thanks to Warner Losh for adding an option to manck to allow it to scan the entire man page looking for bogus xrefs, instead of just checking the SEE ALSO section.
* XNS sort-of-support is no more.wollman1996-02-131-3/+4
|
* Correct a bunch of man page cross references and generallympp1996-02-111-3/+3
| | | | | | try and silence "manck". ncurses, rpc, and some of the gnu stuff are still a big mess, however.
* Added some missing MLINKS for section 3 man pages.mpp1996-02-091-1/+1
| | | | | | | Also corrected a few minor formatting errors, file location and cross references in some of the section 3 man pages. This shuts up a lot of the output from "manck" for section 3.
* Remove support for OSI networking in user-land (#ifdef OSI aor CCITT)wollman1996-02-062-2/+9
| | | | | in preparation for its removal from the kernel source tree. NB: because a function was deleted, libc is now at version 3.0 (was 2.2 previously).
* Fix even more spelling errors in some more man pages.mpp1996-01-301-1/+1
|
* Getpwent() and getservent() can wind up calling free() withmpp1996-01-291-1/+0
| | | | | an invalid pointer if a call to yp_first() fails. Closes PR # 964, and possibly # 952.
* The last of the bind-4.9.3-REL resolver merges.peter1996-01-138-249/+280
|
* Merge the 4.9.3-rel code into the res_* parts. The gethostXXXbyYYYpeter1996-01-077-183/+161
| | | | parts are not quite so simple..
* This commit was generated by cvs2svn to compensate for changes in r13304,peter1996-01-071-0/+114
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Part of bind-4.9.3-rel.. This is for my convenience and reference.peter1996-01-077-760/+1851
| | | | | | | | This import to the vendor branch changes no files...
* | This commit was generated by cvs2svn to compensate for changes in r13122,peter1995-12-303-239/+0
| | | | | | | | which included commits to RCS files with non-trunk default branches.
* | Add NIS support to getservent(3) functions (getservbyport() and getservbyname()wpaul1995-11-041-0/+68
| | | | | | | | | | | | | | | | both call getservent() to do most of the work, so we only need to modify this file to take care of everybody). Note that there is only one NIS services map (services.byname) even though there are getservbyname() and getservbyport() library functions.
* | As above.phk1995-10-223-5/+7
| |
* | 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>
* | 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*
* | Just when you thought it was safe...wpaul1995-08-072-27/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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. :)
* | 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...
* | 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)
* | Remove trailing whitespace.rgrimes1995-05-3018-62/+62
| |
* | Add an ethers(3) man page.wpaul1995-04-122-3/+190
| |
* | Add ether_addr functions to libc. This seems to be the logical placewpaul1995-04-022-1/+235
| | | | | | | | to put them. A man page is in the works.
* | Sicnce this code shares the same fragment as gethostnamaddr:ache1995-03-241-10/+16
| | | | | | | | | | | | | | | | Change strtok() to strsep(), cause memory corruption for all programs which use strtok() too in the same time. Fix potential NULL reference, depends of /etc/hosts.conf format Fix the bug when service name fetched always from beginning of the line, not from parsed token.
* | Change strtok() to strsep(), cause memory corruption for allache1995-03-241-10/+16
| | | | | | | | | | | | | | programs which use strtok() too in the same time. Fix potential NULL reference, depends of /etc/hosts.conf format Fix the bug when service name fetched always from beginning of the line, not from parsed token.
* | At last! Modified __ivaliduser() to do the same kind of user/host validationwpaul1995-03-201-3/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that everyone else does: you can now use +host/-host, +user,-user and +@netgroup/-@netgroup in /etc/hosts.equiv, /.rhosts, /etc/hosts.lpd and ~/.rhosts. Previously, __ivaliduser would only do host/user matches, which was lame. This affects all the r-commands, lpd, and any other program/service that uses ruserok(). An example of the usefullness of this feature would be a hosts.equiv file that looks like this: +@equiv-hosts Since the netgroup database can now be accessed via NIS, this lets you set up client machines once and then never have to worry about them again: all hosts.equiv changes can now be done through NIS. Once I finish with getpwent.c, we'll be able to do similar wacky things with login authentication too. (Our password field substitution will finally be on par with everyone else's, and I'll finally be able to fully integrate my FreeBSD machine into my network without having to worry about the grad students sneaking into it when I'm not looking. :) Danger Will Robinson! I tested this thing every which way I could, but Murphy's Law applies! If anybody spots a potential security problem with the way my matching algorithm works, tell me immediately! I don't want crackers snickering and calling me names behind my back. :)
* | In _gethostbydnsaddr(), force RES_RECURSE into _res.options. This iswollman1994-12-011-1/+4
| | | | | | | | | | | | incredibly obnoxious, but also makes inverse mappings work when the local resolver is in a cache-only configuration. (Maybe this is actually a bug in BIND?)
* | >Description:rgrimes1994-10-272-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While trying to figure out why rlogind wasn't working right for root, I noticed that man wouldn't come back with a man page for iruserok, but it would for ruserok. Checking the lib/net directory's Makefile.inc file shows that the link to the rcmd man page just isn't getting created. >How-To-Repeat: Do a 'man iruserok' and notihing will come back, where a 'man ruserok' will. Submitted by: Brian Moore <ziff@houdini.eecs.umich.edu> Obtained from: NetBSD-bugs mailing list
* | Use same configuration file, /etc/host.conf, for both gethost* andwollman1994-09-261-7/+9
| | | | | | | | | | | | getnet* configuration. (It's highly unlikely that you'd want to do something different, and network lookups aren't common enough to justify their own configuration file.)
* | Fixed YP networks map support.wollman1994-09-261-7/+24
| |
* | remove need for -DDEBUG from resolver code (conflict with db/hash)pst1994-09-257-77/+38
| |
* | get* rework and new bind codepst1994-09-2515-1090/+2785
| |
* | Make iso_addr's output conform to modern conventions for NSAPpst1994-09-221-18/+16
| | | | | | | | | | representation. Original code by pst but ported in as part of enhancements to BIND 4.9.2 and returned to Vixie.
* | Based on fix from 1.1.5.1:csgr1994-09-081-1/+10
| | | | | | | | | | | | | | | | | | | | | | >From: jtk@atria.com (John T. Kohl) in rcmd: It calls select() with a hardcoded "number of file descriptors" argument of 32, rather than computing it based on the sockets about which it cares. - Now we work out the nfds arg, and do some error checking Submitted by: Geoff.
OpenPOWER on IntegriCloud