summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/gethostnamadr.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* remove dead fileseric2013-11-121-1131/+0
| | | | ok deraadt@
* More shrinkage, a bit for ramdisks but mostly for static binaries:guenther2009-11-181-1/+3
| | | | | | | | | | | | | | | | | - wrap with #ifndef NO_LOG_BAD_DNS_RESPONSES libc code that uses p_class() and p_type() for diagnostics, then add that define to libstub to avoid pulling in res_debug_syms.o - split rcmd() and ruserok() into separate files, as nothing uses both - split readdir_r() to its own file - split syslog_r() from syslog(), as the latter needs localtime(); many binaries no longer need to pull in all the time code after this; switch from usleep() to nanosleep() while we're at it (The profit of analysis of -Wl,-M,--cref output) Chops 888kB from /bin and /sbin on i386 ok deraadt@, miod@
* use RRSIG instead of SIG for DNSSEC. ok djm@jakob2007-10-111-2/+2
|
* Wrap some functions, labels, and variables in #ifdefs correspondingray2007-05-161-1/+5
| | | | | | | to #ifdefs where they are used. Found by lint by bret dot lambert at gmail. OK deraadt@.
* strlen(3) returns size_t, not int.ray2007-02-181-14/+16
| | | | | | Suggested by itojun@ in response to my getaddrinfo fixes. OK millert@.
* remove size_t and int mixup. same as getaddrinfo.c 1.30 -> 1.31.itojun2007-02-141-5/+2
|
* zap rcsid.espie2005-08-061-4/+1
| | | | | | | split functions off res_debug.c so that getnetnamadr.c does not pull it all when it's used. okay deraadt@, krw@
* Restore recent changes except for the actual one that causes the problem.millert2005-07-271-20/+8
|
* backout gethostent changes for now -- there is fallout, discovered by ottojaredy2005-07-271-10/+22
|
* In _gethtent() ignore host.h_length if it is set to 0. Previouslymillert2005-07-241-10/+7
| | | | | | we only ignored it if host.h_addrtype was AF_UNSPEC. Set host.h_length to 0 in _gethtbyname2() since that function does not take a length argument. Problem found by jaredy@
* *hostent() fixes:jaredy2005-07-231-22/+13
| | | | | | | | | | | | - Make _gethtent() static - _gethtbyname() is dead code (succeeded by _gethtbyname2), kill it - _gethtent() requires setting the address family field of the file-scope variable `host' to that of the desired type of the entry being searched for. Change the behavior to enforce this if it is not AF_UNSPEC, which will now allow stepping through entries, and set it to specific values everywhere else. help & ok millert
* Make gethostbyaddr() prototype match POSIX. This means len is nowmillert2005-06-081-14/+13
| | | | unsigned but there is no ABI change. OK deraadt@
* be more careful with snprintf. ok millert@moritz2005-05-021-2/+2
|
* make the resolver stat resolv.conf and update if it changes.tedu2005-03-301-4/+4
| | | | useful feedback and ok deraadt@
* we no longer need to query ip6.int for reverse lookup. pvalchev okitojun2004-07-291-8/+2
|
* ANSIfication; most from Patrick Latifimillert2003-10-061-72/+39
| | | | OK deraadt@
* Fix off-by-one, patch from Patrick Latifi; closes PR 3492millert2003-10-031-5/+5
|
* ensure we stay within the boundaries of our packetvincent2003-06-271-10/+15
| | | | ok itojun
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* strlcpy, check retval from sprintfitojun2003-03-041-5/+12
|
* thread safer libc (note: safer, not safe)marc2003-01-281-31/+29
| | | | | | | | | | Access to the global _res structure replaced by pointers to a per thread instance. If unthreaded the pointer is to the global structure. Also replaced a 64k stack array with malloc-ed memory so threaded aps (with a default 64k stack) have a chance at working. ok deraadt@
* allocate 64K recieve buffer for DNS responses.itojun2002-08-271-15/+23
|
* drop AAAA reply with IPv4 mapped address. sync w/kameitojun2002-08-221-1/+9
| | | | draft-itojun-v6ops-v4mapped-harmful-00.txt
* more strlcpy; itojun okderaadt2002-07-301-4/+4
|
* query ip6.arpa then ip6.int for IPv6 reverse lookup. follows RFC3152.itojun2002-07-291-2/+8
| | | | (need some string-manipulation cleanup near here)
* kill more strcpyderaadt2002-07-251-3/+3
|
* avoid remote buffer overrun on hostbuf[]. From: Joost Pol <joost@pine.nl>itojun2002-06-261-34/+23
| | | | | | | | correct bad practice in the code - it uses two changing variables to manage buffer (buf and buflen). we eliminate buflen and use fixed point (ep) as the ending pointer. this fix is critical.
* more strlcpy and snprintfderaadt2002-05-221-37/+31
|
* do not reverse-lookup scoped ipv6 address - it is meaningless as there'sitojun2002-05-181-1/+7
| | | | no way to pass scope id. sync w/kame
* Manual cleanup of remaining userland __P use (excluding packages maintained ↵millert2002-02-171-3/+2
| | | | outside the tree)
* Part one of userland __P removal. Done with a simple regexp with some minor ↵millert2002-02-161-6/+6
| | | | hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.
* use strlcpy vs strncpy+a[len-1]='\0'. millert@ ok.lebel2001-06-271-5/+3
|
* avoid buffer overrun on too-long reply for NIS hostname lookup.itojun2000-07-301-7/+9
|
* _THREAD_PRIVATE_* macros changedd2000-01-061-2/+2
|
* always enable IPv6 address in /etc/hosts (via _gethtent()).itojun2000-01-031-3/+2
| | | | | clarify RES_USE_INET6. the use of this bit is not meaningful on openbsd (as we don't have mapped addr support in kernel).
* prevent bogus reverse query for 1.0.0.0.in-addr.arpa.itojun1999-12-111-7/+5
| | | | this occurs by mixing up ::1 as IPv6 auto-tunnel address like ::10.1.1.1.
* fix gethostbyname2(foo, AF_INET6).itojun1999-12-111-1/+9
| | | | | on /etc/hosts lookup, file static variable "hosts" was damaged and prevented lookup of IPv6 hostnames.
* sizeof("string") includes 0 byte; aazubel@tatu.cnba.uba.arderaadt1999-09-031-2/+2
|
* Ignore SIGs in the answer section for now as we don't use them (yet).jakob1999-07-031-1/+6
| | | | OK'd by deraadt.
* Be consistent about the relaxation of invalid host name checking.niklas1999-06-041-1/+9
| | | | | This allows CNAMEs to PTRs with names including slashes, something not really RFC-compliant but still in general use.
* Revertion of last change, which was due to emacs' stupid ideaniklas1999-05-301-9/+1
| | | | | of keeping the "*Shell Command Output*" buffer's wd from its creation instead of using the last command's wd!!!!
* Some extra error checking, documentation and style wrt connectionsniklas1999-05-301-1/+9
|
* Do not provide gethostby.*_r for now, as configure scripts findniklas1999-04-281-4/+4
| | | | | the functions using nm(1), but then no prototypes exist and things break. d@ will contemplate over the issue and resolve it for real later :-)
* Add thread-safety to libc, so that libc_r will build (on i386 at least).d1998-11-201-8/+76
| | | | | | | | | | | | | All POSIX libc api now there (to P1003.1c/D10) (more md stuff is needed for other libc/arch/*) (setlogin is no longer a special syscall) Add -pthread option to gcc (that makes it use -lc_r and -D_POSIX_THREADS). Doc some re-entrant routines Add libc_r to intro(3) dig() uses some libc srcs and an extra -I was needed there. Add more md stuff to libc_r. Update includes for the pthreads api Update libc_r TODO
* Use fgetln(3) instead of fgets(3) so we can easily recognize linesmillert1998-03-161-6/+12
| | | | that are too long and ignore them instead of corrupting later entries.
* for YP lookups, avoid names longer than MAXHOSTNAMELENderaadt1998-01-201-1/+3
|
* Add gethostent(), as some LEGACY code wants it. If you write newweingart1998-01-111-1/+7
| | | | | code, PLEASE don't use this. Currently only iterates through the local /etc/hosts file.
* do not call abort()deraadt1997-11-081-6/+2
|
* Clean up some -Wall flowers.millert1997-07-091-5/+5
|
* oopsderaadt1997-04-291-9/+9
|