aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/net
Commit message (Collapse)AuthorAgeFilesLines
...
* Correct some man page xrefs, and some other minor changes to bring someMike Pritchard1996-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. Notes: svn path=/head/; revision=15135
* Fix other half of problem reported in PR #1079: _getnetbynisaddr() isBill Paul1996-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?) Notes: svn path=/head/; revision=14775
* gethostbynis.c:Bill Paul1996-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. Notes: svn path=/head/; revision=14639
* Fix inet_network to not dump core if passed in an addressMike Pritchard1996-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 Notes: svn path=/head/; revision=14131
* Fixed a bunch of man page cross references that wereMike Pritchard1996-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. Notes: svn path=/head/; revision=14101
* XNS sort-of-support is no more.Garrett Wollman1996-02-131-3/+4
| | | | Notes: svn path=/head/; revision=14092
* Correct a bunch of man page cross references and generallyMike Pritchard1996-02-111-3/+3
| | | | | | | | | try and silence "manck". ncurses, rpc, and some of the gnu stuff are still a big mess, however. Notes: svn path=/head/; revision=14038
* Added some missing MLINKS for section 3 man pages.Mike Pritchard1996-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. Notes: svn path=/head/; revision=13987
* Remove support for OSI networking in user-land (#ifdef OSI aor CCITT)Garrett 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). Notes: svn path=/head/; revision=13940
* Fix even more spelling errors in some more man pages.Mike Pritchard1996-01-301-1/+1
| | | | Notes: svn path=/head/; revision=13750
* Getpwent() and getservent() can wind up calling free() withMike Pritchard1996-01-291-1/+0
| | | | | | | | an invalid pointer if a call to yp_first() fails. Closes PR # 964, and possibly # 952. Notes: svn path=/head/; revision=13717
* The last of the bind-4.9.3-REL resolver merges.Peter Wemm1996-01-138-249/+280
| | | | Notes: svn path=/head/; revision=13408
* Merge the 4.9.3-rel code into the res_* parts. The gethostXXXbyYYYPeter Wemm1996-01-077-183/+161
| | | | | | | parts are not quite so simple.. Notes: svn path=/head/; revision=13308
* This commit was generated by cvs2svn to compensate for changes in r13304,Peter Wemm1996-01-071-0/+114
|\ | | | | | | | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=13305
| * Part of bind-4.9.3-rel.. This is for my convenience and reference.Peter Wemm1996-01-077-0/+3409
| | | | | | | This import to the vendor branch changes no files... Notes: svn path=/vendor/bind4/dist/; revision=13304
* This commit was generated by cvs2svn to compensate for changes in r13122,Peter Wemm1995-12-303-239/+0
| | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=13123
* Add NIS support to getservent(3) functions (getservbyport() and getservbyname()Bill Paul1995-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. Notes: svn path=/head/; revision=12082
* As above.Poul-Henning Kamp1995-10-223-5/+7
| | | | Notes: svn path=/head/; revision=11661
* Remove the CFLAGS+=-I${CURDIR}/net that I previously added.Peter Wemm1995-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. Notes: svn path=/head/; revision=10156
* Define DEBUG as 1 instead of as nothing so that it doesn't conflict withBruce Evans1995-08-211-1/+1
| | | | | | | -DDEBUG in libresolv/Makefile. Notes: svn path=/head/; revision=10151
* Fix bogus include paths, some of which stopped libresolv from compiling.Bruce Evans1995-08-216-14/+12
| | | | Notes: svn path=/head/; revision=10150
* Update the resolver part of libc to bind-4.9.3-beta24 level (from beta9p1)Peter Wemm1995-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> Notes: svn path=/head/; revision=10133
* Submitted by: Bill Fenner <fenner@parc.xerox.com>Bill Paul1995-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* Notes: svn path=/head/; revision=10059
* Just when you thought it was safe...Bill Paul1995-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. :) Notes: svn path=/head/; revision=9978
* Slight adjustment to previous fix for __ivaliduser(). It was checking forPeter Wemm1995-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: Notes: svn path=/head/; revision=9552
* Make ruserok() accept the #-starting comment lines we used to haveJoerg Wunsch1995-07-161-0/+2
| | | | | | | | | in our default /etc/hosts.equiv. Closes PR #conf/620: Default /etc/hosts.equiv... Notes: svn path=/head/; revision=9539
* Fix the prototypes for getservby{name,port}().Joerg Wunsch1995-07-091-2/+2
| | | | | | | | | Closes PR #docs/568: minor manpage bug Submitted by: Michael Smith (email address no longer valid) Notes: svn path=/head/; revision=9459
* Remove trailing whitespace.Rodney W. Grimes1995-05-3018-62/+62
| | | | Notes: svn path=/head/; revision=8870
* Add an ethers(3) man page.Bill Paul1995-04-122-3/+190
| | | | Notes: svn path=/head/; revision=7786
* Add ether_addr functions to libc. This seems to be the logical placeBill Paul1995-04-022-1/+235
| | | | | | | to put them. A man page is in the works. Notes: svn path=/head/; revision=7576
* Sicnce this code shares the same fragment as gethostnamaddr:Andrey A. Chernov1995-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. Notes: svn path=/head/; revision=7325
* Change strtok() to strsep(), cause memory corruption for allAndrey A. Chernov1995-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. Notes: svn path=/head/; revision=7324
* At last! Modified __ivaliduser() to do the same kind of user/host validationBill Paul1995-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. :) Notes: svn path=/head/; revision=7183
* In _gethostbydnsaddr(), force RES_RECURSE into _res.options. This isGarrett Wollman1994-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?) Notes: svn path=/head/; revision=4892
* >Description:Rodney W. Grimes1994-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 Notes: svn path=/head/; revision=3932
* Use same configuration file, /etc/host.conf, for both gethost* andGarrett Wollman1994-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.) Notes: svn path=/head/; revision=3136
* Fixed YP networks map support.Garrett Wollman1994-09-261-7/+24
| | | | Notes: svn path=/head/; revision=3108
* remove need for -DDEBUG from resolver code (conflict with db/hash)Paul Traina1994-09-257-77/+38
| | | | Notes: svn path=/head/; revision=3094
* get* rework and new bind codePaul Traina1994-09-2515-1090/+2785
| | | | Notes: svn path=/head/; revision=3070
* Make iso_addr's output conform to modern conventions for NSAPPaul Traina1994-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. Notes: svn path=/head/; revision=2978
* Based on fix from 1.1.5.1:Geoff Rehmet1994-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. Notes: svn path=/head/; revision=2592
* Fix gethostbyaddr():Geoff Rehmet1994-08-281-2/+2
| | | | | | | | call _getdnsbyaddr() instead of _getdnsbyname() ;-) Submitted by: Geoff Notes: svn path=/head/; revision=2330
* Fixed typo.Garrett Wollman1994-08-091-2/+2
| | | | Notes: svn path=/head/; revision=1992
* Add (substantially re-written) support for /etc/host.conf, and reintegratedGarrett Wollman1994-08-091-11/+196
| | | | | | | | | | | | 1.1.5 support for YP, fixing a bug in 1.1.5 that prevented YP from ever working reliably. (I'm amazed that there were no bug reports.) IWBRNI someone could write a host.conf(5) manual page. Please look at the code before doing so; this version is somewhat more flexible in the format of its input. Notes: svn path=/head/; revision=1991
* First crack at making libc work with the new make macros. It compiles onGarrett Wollman1994-08-051-2/+3
| | | | | | | | my machine, and a simple static (genassym) and shared (sysctl) executable both work. Still to be done: RPCand YP merge. Notes: svn path=/head/; revision=1849
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-2743-0/+7156
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573