summaryrefslogtreecommitdiff
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* use svc_maxfd + 1 in the select() call.Peter Wemm1996-12-311-3/+3
| | | | | | | | | | | (There may be a behavior difference between the 2.1 and 2.2/3.0 kernels in this area, it seemed to work for me but I have a horribly hacked select() that might have a bug in the handling of this) Submitted by: wpaul Notes: svn path=/head/; revision=21127
* Spelling/mdoc police.Mike Pritchard1996-12-301-6/+6
| | | | Notes: svn path=/head/; revision=21111
* Oops! Bad Idea! (TM)Peter Wemm1996-12-301-3/+13
| | | | | | | | | | | Restore the clamp on the return value from rpc_dtablesize().. Some programs (eg: ypserv) use this as an indication of how large svc_fdset is in their hand-rolled svc_run() loops. The svc_fdset table is maintained by the rpc library explicitly for compatability with such programs. (It uses a different variable-sized bitmap itself internally) Notes: svn path=/head/; revision=21103
* - make wire protocol 64 bit type safePeter Wemm1996-12-301-11/+9
| | | | | | | | | | | - extern prototypes now in include file - fix local prototypes - use standard functions Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21092
* - prototypes now in include filePeter Wemm1996-12-301-26/+48
| | | | | | | | | | | - overhaul for unlimited fd's - OpenBSD's ftp port bounce attack fix - fix timeouts Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21091
* - canonical function declarationPeter Wemm1996-12-301-7/+6
| | | | | | | | | | - prototypes now in common include file - use standard functions Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21090
* - overhaul for unlimited file descriptorsPeter Wemm1996-12-301-15/+24
| | | | | | | | | | | | | - prototypes now in include files Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Note: potential bug here, It looks like there could be a null pointer dereference depending on what has already been called to initialise some shared data. Notes: svn path=/head/; revision=21089
* - make wire protocol 64 bit type safePeter Wemm1996-12-301-4/+4
| | | | | | | | | - use standard functions Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21088
* - major overhaul to make this deal with unlimited fd's.Peter Wemm1996-12-301-56/+68
| | | | | | | | | | | | | | | - kill non-FD_SETSIZE code Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Note, there was a nasty bug with our old code here. It would trash the stack if a fd > 31 was passed in. It was using a "long" as though it was an "fd_set", ie: it was assuming that a long was 256 bits wide. :-( This has been lurking here for a while, since the FD_SETSIZE #ifdef's were first implemented. Notes: svn path=/head/; revision=21087
* - make wire protocol 64 bit type safePeter Wemm1996-12-301-10/+10
| | | | | | | Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21086
* Remove our code that clamped the max select() fd number to FD_SETSIZE (256)Peter Wemm1996-12-301-16/+3
| | | | | | | This function is now unused. Notes: svn path=/head/; revision=21085
* - kill non-FD_SETSIZE codePeter Wemm1996-12-301-5/+2
| | | | | | | Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21083
* - 64 bit type safe on-the-wire protocolPeter Wemm1996-12-301-17/+15
| | | | | | | | | | - use standard functions - prototype now in include file Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21082
* - prototype now in include file, plus no longer needed anywayPeter Wemm1996-12-301-37/+44
| | | | | | | | | | | | | | - fix timeout code - better sequence number generation (for long running daemons) - dont close an unopen socket - use standard functions - 64 bit type safe for wire protocols - unlimited file descriptors Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21081
* - dont close an unopen socketPeter Wemm1996-12-301-2/+3
| | | | | | | Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21080
* - Don't close an unopened socketPeter Wemm1996-12-301-2/+3
| | | | | | | Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21079
* - don't close unopen socketPeter Wemm1996-12-301-7/+12
| | | | | | | | | | | - ensure we're not spoofed/confused while trying to talk to the portmapper - handle new get_myaddress failure cases - prototype now in include file Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21078
* - missing prototype from include filePeter Wemm1996-12-301-5/+5
| | | | | | | | | | - canconical function declaration (ctags safe) - use standard functions Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21077
* - OpenBSD's strncpy fixes to ensure NULL terminationPeter Wemm1996-12-301-8/+11
| | | | | | | | | - missed endrpcent() in some cases. Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21076
* - prototypes now in include filePeter Wemm1996-12-301-49/+64
| | | | | | | | | | | | | | - fix timeout code - better "random" initial transaction id for long running daemons - unlimited number of file descriptors to select(). - 64 bit type safe wire protocol Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. - typo (spelling police :-) - dont die on select() that returns time remaining (on my systems) Notes: svn path=/head/; revision=21075
* - prototypes now in standard include filePeter Wemm1996-12-301-23/+43
| | | | | | | | | | | | | - improve initial "random" sequence number, to make it harder to guess in long running daemons. - fix timeout code. - unlimited number of fd's in select. Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. - Protect against select() that returns time remaining (on my systems). Notes: svn path=/head/; revision=21074
* - update return type of an "internal but documented" functionPeter Wemm1996-12-301-2/+10
| | | | | | | | | - warn about FD_SETSIZE in certain internal functions Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21073
* - tags in correct orderPeter Wemm1996-12-301-4/+6
| | | | | | | | | | - list missing functions - list missing args Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21072
* - canonical function declarationPeter Wemm1996-12-301-9/+21
| | | | | | | | | | | - don't exit. It's bad form for libc to exit() or abort() instead of returning an error. - only use loopback addresses after checking the real interfaces. Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21071
* - don't close an unopen socketPeter Wemm1996-12-301-5/+8
| | | | | | | | | | | - canonical function declaration - use constants from includes, not magic numbers - use standard functions Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21070
* - prototype moved to include filePeter Wemm1996-12-301-3/+1
| | | | | | | Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21069
* - buffer overflow fix, from OpenBSDPeter Wemm1996-12-301-110/+58
| | | | | | | | | - optimise the error number -> string mapping code Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21068
* - use standard functionPeter Wemm1996-12-301-3/+7
| | | | | | | | | - timeout code repaired elsewhere, remove unneeded workaround Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21067
* - prototype now in common include filePeter Wemm1996-12-301-4/+2
| | | | | | | | | - standard function name Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21066
* - prototype now in include file, not herePeter Wemm1996-12-301-3/+1
| | | | | | | Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21065
* - Man page fix, updates.Peter Wemm1996-12-302-8/+11
| | | | | | | | | - minor cosmetic tweaks Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21064
* Add manpage links for rpc functionsPeter Wemm1996-12-301-0/+68
| | | | | | | Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21063
* - Missing prototypes, including pointers to functionsPeter Wemm1996-12-307-150/+375
| | | | | | | | | | | - 64 bit long type safe (wire protocols specified in explicit sized types) - Support systems that don't do unaligned accesses - Support for explicit int16 and int32 sizes in xdr Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21062
* xdr manpage linksPeter Wemm1996-12-301-0/+33
| | | | | | | Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code. Notes: svn path=/head/; revision=21061
* Tempt fate! 'cvs add' a file remotely which also exists in the Attic onPeter Wemm1996-12-301-0/+64
| | | | | | | | | | | | RELENG_2_2! This is part#2 of the previous commit to src/lib/libc/net to contain the potential damage. This provides stubs so that binaries linked in 2.2 will run on 3.0 Notes: svn path=/head/; revision=21058
* Here goes.. Bring the 4.9.5-P1 resolver into -current. This has thePeter Wemm1996-12-3019-216/+1268
| | | | | | | | DNSSEC stuff, among other things. There are also some renamed functions, I've left out the res_stubs.c from this commit in case cvs bombs out.. Notes: svn path=/head/; revision=21057
* _thread_kern_sig_unblock takes an integer, not a reference.Alexander Langer1996-12-291-2/+2
| | | | | | | Submitted by: John Birrell <jb@cimlogic.com.au> Notes: svn path=/head/; revision=21000
* Add comment that range checking is already done at upper levelAndrey A. Chernov1996-12-283-4/+9
| | | | | | | | | Kill snprintf left in collate.c from previous backout Should go in 2.2 Notes: svn path=/head/; revision=20961
* Small yet significant tweaks/cleanups:Bill Paul1996-12-273-10/+14
| | | | | | | | | | | | | | | | | | | | | - getpwent: o adjunctbuf should be NUL terminated after copying o _pw_breakout_yp() needs to know the length of the buffer returned from YP so it can properly NUL terminate its local buffer. - getgrent: o YP buffers should be YPMAXRECORD + 2 bytes long and NUL terminated. (Previously they were hardcoded to 1024 bytes.) - getnetgrent: o YP data should be copied with snprintf(), not sprintf() These are 2.2 candidates. I will wait a few days to make sure these don't break anything and then, if there are no objections, move them to the 2.2 branch. Notes: svn path=/head/; revision=20957
* Small yet significant tweaks/cleanups:Bill Paul1996-12-275-15/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - getservent: o put _yp_check() proto under #ifdef YP where it belongs o local YP buffers should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying - gethostbynis: o local YP buffer should be YPMAXRECORD + 2 bytes long - getnetbynis: o local YP buffer should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying - ether_addr: o local YP buffers should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying (in this case it's BUFSIZ + 2 bytes, but it happens that BUFSIZ == YPMAXRECORD. - gethostbydns: o nuke stray 'return(NULL)' in __dns_getanswer() (harmless but looks silly) These are 2.2 candidates. I will wait a few days to make sure these don't break anything and then, if there are no objections, move them to the 2.2 branch. Notes: svn path=/head/; revision=20953
* Make a note in the standards section that sysconf isn't completelyAlexander Langer1996-12-271-2/+3
| | | | | | | POSIX conforming. Notes: svn path=/head/; revision=20941
* Use dynamic allocated buffers instead static buffers. No member orWolfram Schneider1996-12-251-19/+91
| | | | | | | | | | | | | | | | | | | | line length limit anymore - now 500 members or 5000 members are possible. For security group lines longer than 256K will be count as an error. 256K should be enough for 65536 users. Support comments (lines that begin with a #) if compiled with option -DGROUP_IGNORE_COMMENTS. Fortunately it seems that all system utilities which use getgrent() functions are dynamically linked executables. So you need only rebuild libc.so.3.0 if you want this change. Note: if you have an old X server which depend on libc.so.2.* you should rebuild libc.so.2.* too. Not a 2.2 candidate. Notes: svn path=/head/; revision=20911
* Another one-liner: remember to NUL terminate local copy of NIS hostBill Paul1996-12-241-2/+3
| | | | | | | | | | | | | lookup results. Without this, doing multiple host/addr lookups in a single process yeilds strange results (the buffer is static, and garbage may be left behind from previous lookups). I just noticed this in 2.2-BETA. Unless somebody threatens to chop my hands off with an axe, I'm going to move this to the 2.2-RELENG branch shortly. Notes: svn path=/head/; revision=20900
* Make the __dns_getanswer() wrapper work right. For the newer versionsBill Paul1996-12-241-1/+14
| | | | | | | | | | of BIND, we need to tweak some things to that gethostanswer() knows whether or not we're dealing with an IPv4 or IPv6 address. (This'll teach me to use a 2.1.0 system for NIS development -- but it's so nice and stable I just can't being myself to upgrade it. :) Notes: svn path=/head/; revision=20892
* comma typosWolfram Schneider1996-12-237-15/+21
| | | | Notes: svn path=/head/; revision=20888
* Add __dns_getanswer() hook to allow access to the gethostanswer()Bill Paul1996-12-221-1/+11
| | | | | | | functions from outside libc. (Needed for async DNS resolver in ypserv.) Notes: svn path=/head/; revision=20817
* Back out rev 1.5: the overflow condition is already handled elsewhere.Joerg Wunsch1996-12-221-2/+4
| | | | Notes: svn path=/head/; revision=20810
* Speeling fix.David Nugent1996-12-221-1/+1
| | | | Notes: svn path=/head/; revision=20784
* Convert to mdoc format.Mike Pritchard1996-12-214-178/+122
| | | | Notes: svn path=/head/; revision=20779
* Add a missing #ifdef YP/#endif pair so that this module willBill Paul1996-12-211-0/+2
| | | | | | | | | compile without -DYP. Pointed out by: Wolfram Schneider Notes: svn path=/head/; revision=20756