aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Statisize usage().Philippe Charnier1997-10-271-1/+4
| | | | Notes: svn path=/head/; revision=30765
* In clntudp_call(), it is possible that xdr_replymsg() might failBill Paul1997-10-261-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | partway through its attempt to decode the result structure sent by the server. If this happens, it can leave the result partially populated with dynamically allocated memory. In this event, the xdr_replymsg() failure is detected and RPC_CANTDECODERES is returned, but the memory in the partially populated result struct is not free()d. The end result is that memory is leaked when an RPC_CANTDECODERES error occurs. (This condition can occur if a CLIENT * handle is created using clntudp_bufcreate() with a receive buffer size that is too small to handle the result sent by the server.) Fixed by setting reply_xdrs.x_op to XDR_FREE and calling xdr_replymsg() again to free the memory if an RPC_CANTDECODERES error is detected. I suspect that the clnt_tcp.c, clnt_unix.c and clnt_raw.c modules may ha a similar problem, but I haven't duplicated the condition with those yet. Found by: dbmalloc Notes: svn path=/head/; revision=30737
* Typo.Wolfgang Helbig1997-10-261-1/+1
| | | | Notes: svn path=/head/; revision=30728
* Change L_SET to SEEK_SET for POSIX compliance.John Polstra1997-10-261-1/+1
| | | | | | | Submitted by: Dean Gaudet <dgaudet@arctic.org> Notes: svn path=/head/; revision=30713
* Fix a few typos.James Raynard1997-10-221-32/+33
| | | | Notes: svn path=/head/; revision=30651
* Back out part of OpenGroup specs about limiting max arg since it may breakAndrey A. Chernov1997-10-222-17/+4
| | | | | | | compatibility. Notes: svn path=/head/; revision=30649
* Reflect usleep code changes:Andrey A. Chernov1997-10-221-1/+24
| | | | | | | | Limit max arg Change return type to int Notes: svn path=/head/; revision=30648
* Changes in spirit of OpenGroup Singe Unix specs:Andrey A. Chernov1997-10-221-5/+11
| | | | | | | | | 1) Limit max allowed argument to 1000000 2) Change return type from void to int to indicate premature termination (by signal) Notes: svn path=/head/; revision=30646
* Document EINVAL as a possible return value from open(2).Joerg Wunsch1997-10-221-0/+7
| | | | Notes: svn path=/head/; revision=30645
* Sorted lists.Bruce Evans1997-10-2111-144/+146
| | | | Notes: svn path=/head/; revision=30624
* Remove terminfo manpage we don't have itAndrey A. Chernov1997-10-203-1660/+4
| | | | Notes: svn path=/head/; revision=30605
* Removed unused file. It just forces a return value of 0 on successBruce Evans1997-10-181-48/+0
| | | | | | | | (no carry), but mount() in the kernel has returned 0 on success since prehistoric times. Notes: svn path=/head/; revision=30552
* Add $IdAndrey A. Chernov1997-10-171-0/+4
| | | | Notes: svn path=/head/; revision=30511
* Fix LONG_MAX overflowingAndrey A. Chernov1997-10-171-10/+21
| | | | | | | | | Return seconds if errno other than EINTR Add $Id Submitted by: bde with minor optimization by me Notes: svn path=/head/; revision=30510
* Fix two bugs which caused various RPC programs (mountd, nfsd, ...)John Polstra1997-10-171-3/+3
| | | | | | | | | | | | | | | | | | to fail under certain circumstances. 1. In one spot, the ifr_flags member was being examined in the wrong structure, thus it contained garbage. On a machine in which only the loopback interface was up, this caused everything that wanted to talk to the portmapper to fail -- a particular problem with laptops, where the pccard ethernet interface is likely to come up long after the attempt to start mountd, nfsd, amd, etc. 2. Compounding the above problem, get_myaddress() returned a successful status even though it failed to find an address that it considered good enough. Notes: svn path=/head/; revision=30504
* Copy time_to_sleep to time_remaining since it can be leftAndrey A. Chernov1997-10-161-0/+1
| | | | | | | uninitialized if nanosleep returns early with agr error Notes: svn path=/head/; revision=30493
* Handle machine-dependent (stdlib) sources more automatically.Bruce Evans1997-10-162-4/+4
| | | | | | | | | | This fixes bugs in the manual handling. abs.[cS] was handled too specially and the wrong (.c) variant for each of div.[cS], labs.[cS] and ldiv.[cS] was added to SRCS. This caused the .c variant to be used if `depend' was made and the .S version to be used otherwise. Notes: svn path=/head/; revision=30484
* Removed bogus .PATH statement.Bruce Evans1997-10-162-6/+2
| | | | Notes: svn path=/head/; revision=30483
* Removed the subdirectory paths from the definitions of MAN[1-9]. TheyBruce Evans1997-10-163-10/+7
| | | | | | | | were a workaround for limitations in bsd.man.mk that were fixed about 2 years ago. Notes: svn path=/head/; revision=30482
* Handle machine-dependent (m-d) (string) sources more automatically.Bruce Evans1997-10-163-80/+23
| | | | | | | | | | | | | | | | | | | | | | | | The names of m-d variants are now added (manually) to MDSRCS instead of to SRCS, and the names of all machine-independent (m-i) variants that can reasonably be replaced by an m-d variant are now added (manually) to MISRCS instead of to SRCS, so that a simple substitution can be used to discard the unused m-i variants. MISRCS is potentially all m-i sources, but the substitution is too simple to be fast, so MISRCS should be kept reasonably small. libc/Makefile.inc: Do the substitution. libc/i386/string/Makefile.inc: Add to MDSRCS instead of to SRCS. Add the names of all sources in this directory, but no others. libc/string/Makefile.inc Add to MISRCS instead of to SRCS. Add the names of all sources in this directory. Don't use (broken) explicit rules for special cases. Notes: svn path=/head/; revision=30481
* Reflect current sleep/usleep implementations stateAndrey A. Chernov1997-10-162-9/+5
| | | | Notes: svn path=/head/; revision=30480
* Cleanup #includesAndrey A. Chernov1997-10-162-5/+2
| | | | Notes: svn path=/head/; revision=30479
* Fix a couble of typos.Søren Schmidt1997-10-161-6/+6
| | | | | | | Submitted by: "Vanill I. Shu" <vanilla@MinJe.com.TW> Notes: svn path=/head/; revision=30471
* Proper spacing in the Synopsis.Masafumi Max NAKANE1997-10-161-2/+2
| | | | Notes: svn path=/head/; revision=30457
* Include the machine-dependent Makefile.inc for sys in the correct place.Bruce Evans1997-10-152-3/+4
| | | | Notes: svn path=/head/; revision=30448
* Removed the subdirectory paths from the definitions of MAN[1-9]. TheyBruce Evans1997-10-1514-132/+87
| | | | | | | | were a workaround for limitations in bsd.man.mk that were fixed about 2 years ago. Notes: svn path=/head/; revision=30447
* Added some 2-line source files to get a direct correspondenceBruce Evans1997-10-155-0/+10
| | | | | | | | between sources and objects. This will be used to avoid messy special cases in Makefile.inc. Notes: svn path=/head/; revision=30444
* Remove old SIGALRM absorbing back-compat code. It wasn't working at allPeter Wemm1997-10-151-83/+1
| | | | | | | | | | | | | | | | for the entire time that it was there, so obviously nothing needs it anymore. Note, unix98/single-unix spec v2 says that usleep() returns an int rather than a void, to indicate whether the entire time period elapsed (0) or an error (eg: signal handler) interrupted it (returns -1, errno = EINTR) It is probably useful to make this change but I'll test it locally first to see if this will break userland programs [much]... Reviewed by: ache, bde Notes: svn path=/head/; revision=30443
* Give up on the "try and compensate for broken programs" cruft and revertPeter Wemm1997-10-151-70/+0
| | | | | | | | | | | | | | | | back to the original single nanosleep() implementation. This is POSIX and Unix98 (aka single-unix spec v2) compliant behavior. If a program sets alarm(2) or an interval timer (setitimer(2)) without a SIGALRM handler being active, sleep(3) will no longer absorb it, and the program will get what it asked for..... :-] The original reason for this in the first place (apache) doesn't seem to need it anymore, according to Andrey. Reviewed by: ache, bde Notes: svn path=/head/; revision=30442
* Correct a bug in the 'allow arbitrary number of socket descriptors' changesBill Paul1997-10-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | made to the RPC code some months ago. The value of __svc_fdsetsize is being calculated incorrectly. Logically, one would assume that __svc_fdsetsize is being used as a substitute for FD_SETSIZE, with the difference being that __svc_fdsetsize can be expanded on the fly to accomodate more descriptors if need be. There are two problems: first, __svc_fdsetsize is not initialized to 0. Second, __svc_fdsetsize is being calculated in svc.c:xprt_registere() as: __svc_fdsetsize = howmany(sock+1, NFDBITS); This is wrong. If we are adding a socket with index value 4 to the descriptor set, then __svc_fdsetsize will be 1 (since fds_bits is an unsigned long, it can support any descriptor from 0 to 31, so we only need one of them). In order for this to make sense with the rest of the code though, it should be: __svc_fdsetsize = howmany(sock+1, NFDBITS) * NFDBITS; Now if sock == 4, __svc_fdsetsize will be 32. This bug causes 2 errors to occur. First, in xprt_register(), it causes the __svc_fdset descriptor array to be freed and reallocated unnecessarily. The code checks if it needs to expand the array using the test: if (sock + 1 > __svc_fdsetsize). The very first time through, __svc_fdsetsize is 0, which is fine: an array has to be allocated the first time out. However __svc_fdsetsize is incorrectly set to 1, so on the second time through, the test (sock + 1 > __svc_fdsetsize) will still succeed, and the __svc_fdset array will be destroyed and reallocated for no reason. Second, the code in svc_run.c:svc_run() can become hopelessly confused. The svc_run() routine malloc()s its own fd_set array using the value of __svc_fdsetsize to decide how much memory to allocate. Once the xprt_register() function expands the __svc_fdset array the first time, the value for __svc_fdsetsize becomes 2, which is too small: the resulting calculation causes the code to allocate an array that's only 32 bits wide when it actually needs 64 bits. It also uses the valuse of __svc_fdsetsize when copying the contents of the __svc_fdset array into the new array. The end result is that all but the first 32 file descriptors get lost. Note: from what I can tell, this bug originated in OpenBSD and was brought over to us when the code was merged. The bug is still there in the OpenBSD source. Total nervous breakdown averted by: Electric Fence 2.0.5 Notes: svn path=/head/; revision=30420
* Moved `SRCS+= frexp.c' to the correct Makefile.inc.Bruce Evans1997-10-142-6/+6
| | | | | | | Sorted SRCS. Notes: svn path=/head/; revision=30401
* Moved `SRCS+= frexp.c' to the correct Makefile.inc.Bruce Evans1997-10-141-2/+2
| | | | Notes: svn path=/head/; revision=30400
* Fixed searching of $PATH in execvp(). Do what sh(1) should do accordingBruce Evans1997-10-142-26/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to POSIX.2. In particular: - don't retry for ETXTBSY. This matches what sh(1) does. The retry code was broken anyway. It only slept for several seconds for the first few retries. Then it retried without sleeping. - don't abort the search for errors related to the path prefix, in particular for ENAMETOOLONG, ENOTDIR, ELOOP. This fixes PR1487. sh(1) gets this wrong in the opposite direction by never aborting the search. - don't confuse EACCES for errors related to the path prefix with EACCES for errors related to the file. sh(1) gets this wrong. - don't return a stale errno when the search terminates normally without finding anything. The errno for the last unsuccessful execve() was usually returned. This gave too much precedence to pathologies in the last component of $PATH. This bug is irrelevant for sh(1). The implementation still uses the optimization/race-inhibitor of trying to execve() things first. POSIX.2 seems to require looking at file permissions using stat(). We now use stat() after execve() if execve() fails with an ambiguous error. Trying execve() first may actually be a pessimization, since failing execve()s are fundamentally a little slower than stat(), and are significantly slower when a file is found but has unsuitable permissions or points to an unsuitable interpreter. PR: 1487 Notes: svn path=/head/; revision=30399
* Improve the innetgr() NIS+ compat kludge. We should only fail over to theBill Paul1997-10-131-18/+25
| | | | | | | | | | | | | | | 'slow' lookup if we get a YPERR_MAP (no such map in server's domain) error instead of failing over on any error. In the latter case, if the 'fast' search fails legitimately (i.e. the user or host really isn't a member of the specified netgroup) then we end up doing the 'slow' search and failing all over again. The result is still correct, but cycles are consumed for no good reason. Also removed the #ifdef CHARITABLE since the compat kludge is no longer optional. Notes: svn path=/head/; revision=30390
* Make this file p-make clean. (Use "ld -O foo" instead of "ld; mvSatoshi Asami1997-10-111-11/+6
| | | | | | | | | a.out foo".) Reviewed by: bde (actually more like "Suggested by") Notes: svn path=/head/; revision=30291
* NIS+ compatibility kludge. A long time ago, I set up innetgr() soBill Paul1997-10-111-0/+7
| | | | | | | | | | | | | | | | | that if searching through the special netgroup.byhost or netgroup.byuser maps didn't work, we would roll over to the 'slow' method of grovelling though the netgroup map and working out the dependencies on the fly. But I left this option hidden inside an #ifdef CHARITABLE since I didn't think I'd ever need it. Well, the Sun rpc.nisd NIS+ server in YP compat mode doesn't support the .byhost and .byuser reverse maps, so the failover is necessary in order to be compatible. *sigh* This closes PR #3891, and should be merged into RELENG_2_2. Notes: svn path=/head/; revision=30288
* Also install pcap-int.h so things can call pcap_compile on arbitaryPeter Wemm1997-10-101-2/+2
| | | | | | | expressions (eg: in pppd) Notes: svn path=/head/; revision=30269
* Staticize usage(). Cosmetics.Philippe Charnier1997-10-101-2/+5
| | | | Notes: svn path=/head/; revision=30260
* Add the AIO/LIO to libc. They aren't fully done yet, but have been in theJohn Dyson1997-10-101-2/+4
| | | | | | | kernel for a few months. Notes: svn path=/head/; revision=30255
* Remove the claim that UUCP locking were not atomic. It is sinceJoerg Wunsch1997-10-071-13/+1
| | | | | | | revision 1.8 of uucplock.c. Notes: svn path=/head/; revision=30196
* Add passwd(5) to "SEE ALSO".David E. O'Brien1997-10-071-1/+2
| | | | | | | | | | ISSUES: An example and better explansion on how to specify a user's login class in /etc/master passwd is needed. (As I don't seem to be specifiying it right, I can't do it). Notes: svn path=/head/; revision=30192
* Changes to support full make parallelism (-j<n>) in the worldJordan K. Hubbard1997-10-052-4/+5
| | | | | | | | | target. Reviewed by: <many different folks> Submitted by: Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su> Notes: svn path=/head/; revision=30113
* Merged in better support of ISO 8601 from elsie.nci.nih.gov.Wolfgang Helbig1997-10-032-62/+118
| | | | | | | | Added the conversion specifiers %g and %G, that are replaced by the year which contains the greater part of the week in question. Notes: svn path=/head/; revision=30089
* Teach ftpErrString to format UNIX errnos, since at least ftpLogin()Bill Fenner1997-10-021-1/+4
| | | | | | | | | | | | | | can return UNIX errnos. When UNIX errnos catch up with FTP status codes (e.g. at 100) a new way will have to be found to tell which is which. This allows fetch to print errors like fetch: ftp.fu-berlin.de: No route to host instead of fetch: ftp.fu-berlin.de: Unknown error Notes: svn path=/head/; revision=30065
* Add rudimentary support for using the keyboard.Søren Schmidt1997-10-014-3/+105
| | | | Notes: svn path=/head/; revision=30044
* Update to tcl8.0 release version.Poul-Henning Kamp1997-10-011-14/+16
| | | | Notes: svn path=/head/; revision=30042
* Move locks from /etc/opielocks to /var/run/opielocks to keepAndrey A. Chernov1997-10-011-1/+1
| | | | | | | /etc non-writeable as possible Notes: svn path=/head/; revision=30035
* Correct an ancient bogon which involved trying to read() from aJordan K. Hubbard1997-10-011-10/+8
| | | | | | | | | nuked file descriptor. This is probably why sysinstall's ftp xfer occasionally SEGV'd if you left things alone for a long time and the timeout code got called. Whoops! Notes: svn path=/head/; revision=30030
* Bump minor numberAndrey A. Chernov1997-09-291-1/+3
| | | | Notes: svn path=/head/; revision=29991
* Sort cross refereces in section SEE ALSO.Wolfram Schneider1997-09-2912-22/+23
| | | | Notes: svn path=/head/; revision=29988