Commit Graph

939 Commits

Author SHA1 Message Date
Julian Elischer
6ede0fb59d Submitted by: archie@whistle.com
This program should COMPLAIN about uids > 65K but not abort.. they are after
all legal, and some of us NEED them!
1996-06-20 19:19:29 +00:00
Jordan K. Hubbard
731ec3ace6 Make certain small things more consistent with the other stdio man pages. 1996-06-20 15:49:54 +00:00
Joshua Peck Macdonald
fc3be6aea0 I hate to read a man page that almost has useful information
but falls a little short.  I added a comment on the null
termination of struct group's gr_mem field.

Reviewed by:	jkh
1996-06-20 14:13:15 +00:00
Jordan K. Hubbard
40582d7142 Remove libforms, it was never used. 1996-06-19 21:19:37 +00:00
Jordan K. Hubbard
eeb1baccd6 Remove libforms - it's unused. 1996-06-19 21:18:24 +00:00
Poul-Henning Kamp
9d762dcebc Add tcl. 1996-06-18 16:53:59 +00:00
Jordan K. Hubbard
2379c52210 Manage control connections a little better for the URL routines.
This will do as a stop-gap until I figure out a more fault-tolerant
way of having deferred closes against the control connection work
without blocking.
1996-06-17 23:16:04 +00:00
Jordan K. Hubbard
42e35dc30b Make binary mode the default. 1996-06-17 22:10:15 +00:00
Jordan K. Hubbard
386e7f9af0 Stamp out a potential memory leak.
Make ftpChdir return the server status again - it was more convenient.
1996-06-17 20:36:57 +00:00
Jordan K. Hubbard
9dc1ac56fc Bring in libftpio. 1996-06-17 20:18:11 +00:00
Garrett Wollman
5900c00709 Add RCS Id and fix date. 1996-06-17 20:12:53 +00:00
Garrett Wollman
010b7c6c74 Cross-reference addr2ascii(3). 1996-06-17 20:11:12 +00:00
Garrett Wollman
276ea05394 Correct date and add $Id$ to reflect previous modification. 1996-06-17 20:04:06 +00:00
Garrett Wollman
538e87685f Cross-reference addr2ascii(3) and inlcude a note about how those
functions are preferred but are not widely available as yet.
1996-06-17 20:01:05 +00:00
Jordan K. Hubbard
92f6d79189 Rethink and reimpliment the way RESTARTS are handled. The method I inheirited
from jmz was a hopeless kludge (sorry Jean-Marc :) and handled the problem
in the wrong way.  ftpRestart() has now gone away and ftpGet() has grown a
new parameter.
1996-06-17 15:28:08 +00:00
Andrey A. Chernov
2fcdb74d96 If hostname > UT_HOSTSIZE, use its numeric address instead to keep
valid entries into utmp and wtmp
1996-06-17 14:49:02 +00:00
Jordan K. Hubbard
1d2387de61 Add a feature: If the environment variable FTP_PASSIVE_MODE is defined
(the convention as established by pkg_install(1)), select passive mode
FTP automatically.
1996-06-17 12:42:33 +00:00
Jordan K. Hubbard
ef329daf92 Whoops, give the authors all proper credit. 1996-06-17 12:28:50 +00:00
Jordan K. Hubbard
31caf7f20f Bring in a new library `libftpio', so named to avoid clashes with older
packages and also sort of give the (correct) impression that this basically
sits on top of stdio and deals with stream pointers (FILE*).
1996-06-17 12:26:06 +00:00
Garrett Wollman
724ad64676 It would help if I actually added the source code for these routines. 1996-06-13 20:45:42 +00:00
Garrett Wollman
ffd1512db6 Add an independent implementation of addr2ascii(3) and ascii2addr(3)
following the API of the INRIA IPv6 implementation.
1996-06-13 20:45:05 +00:00
James Raynard
e2f892a7e7 Code cleanup:-
The usual stuff, adding missing function prototypes, argument types,
return values, etc.
1996-06-12 23:02:53 +00:00
James Raynard
45f6af0252 Code cleanup:-
The usual stuff, adding missing function prototypes, argument types,
return values, etc.

This directory now compiles with no warnings with -Wall on gcc2.6.3!
1996-06-12 22:59:55 +00:00
James Raynard
b83100194d Code cleanup:-
The usual stuff, adding missing function prototypes, argument types,
return values, etc. In mktemp.c, convert pid from u_int to pid_t, and
get rid of "extern int errno".
1996-06-12 22:58:21 +00:00
James Raynard
9915c09cf9 Code cleanup:-
The usual stuff, adding missing function prototypes, argument types,
return values, etc.
1996-06-12 22:56:41 +00:00
James Raynard
b2843ce288 Code cleanup:
Fixed a couple of nitpick warnings, plus one that slipped through the
net earlier.

This directory now compiles without any warnings with -Wall! (Until
the next gcc upgrade...)
1996-06-11 17:22:51 +00:00
James Raynard
f12d1a5dd0 Code cleanup:
1.  Added missing function prototypes.
2.  Added missing function return types.
3.  Added missing function argument types.
4.  Added missing headers for system function prototypes.
5.  Corrected format specifier in printf().
6.  Added extra parentheses around assignment used as truth value.
7.  Added missing "default" cases in switch statements.
8.  Added casts for function pointers.
9.  Did *not* change int declarations of uid and gid to uid_t/gid_t
    because I don't know if that would affect the protocol. Put in
    explicit casts to int instead, to make things more obvious.
10. Moved declarations of variables that are only used if YP is
    defined inside the '#ifdef YP' conditionals.
1996-06-10 20:13:09 +00:00
Poul-Henning Kamp
49f94c2dec Update man to tell that <sys/types.h> is needed.
Submitted by:	"Philippe Charnier" <charnier@lirmm.fr>
1996-06-10 15:48:07 +00:00
Bill Paul
2f5fc074d9 Remove extraneous '+' that looks like it was left in by mistake. This
module compiles now.

Reported by: Stephen Hocking
1996-06-10 04:59:05 +00:00
James Raynard
7d6a21b4d7 Code cleanup (part two):
1. Added missing function prototypes.
2. Added missing function return types.
3. Added missing function argument types.
4. Added missing headers for system function prototypes.
5. Corrected casts in select() args.
6. Got rid of more "extern int errno" rubbish.
7. Added extra parentheses around assignment used as truth value.
8. Fixed bug in clnt_{tcp, udp}create() where pointers could be free'd
    even if they hadn't been successfully malloc()'d.
1996-06-10 00:49:19 +00:00
Wolfram Schneider
17f47987b3 update sticky bit documentation 1996-06-09 20:53:00 +00:00
Andrey A. Chernov
45110ccfce Use better approximation if collate info not available.
Fix bug: strxfrm+strcmp != strcoll, if collate info not available
1996-06-09 14:56:08 +00:00
Andrey A. Chernov
2127ab9a07 Localize it.
(it was NOT localized initially, it does some trick instead!)
1996-06-09 13:31:06 +00:00
Joerg Wunsch
d230d4275a Reword the sentence about the required space for the result string.
Closes PR # 1303.-
1996-06-09 06:48:42 +00:00
James Raynard
c124f3bdfc Code cleanup (part one):
1. Added missing function prototypes.

2. Added missing function return types.

3. Added missing function argument types.

4. Added missing headers for system function prototypes.

5. Got rid of "extern int errno" rubbish.
1996-06-08 22:54:59 +00:00
Alexander Langer
1f16ebd9a2 Rephrase some things as suggested by Bruce. 1996-06-08 15:59:43 +00:00
James Raynard
1638d6b6d5 Oops, replace a rather important line that was lost in transit 8-( 1996-06-08 15:28:11 +00:00
Alexander Langer
79020cf23f Document that truncate can also be used to extend the size of a file,
but doing so is not truly portable.
1996-06-07 01:34:47 +00:00
Poul-Henning Kamp
44ffb5f593 Pass correct length OID to kernel for KERN_PROC_ALL. 1996-06-06 17:16:52 +00:00
Bill Paul
c8bb0df5d3 Add ypxfrd.x so that the XDR routines for this protocol will be built
into librpcsvc.
1996-06-05 03:54:43 +00:00
James Raynard
b487e9d356 Submitted by: (based on code in "Advanced Programming in the Unix Environment"
by W.Richard Ste vens. EINTR handling suggested by bde@freebsd.org).

Code cleanup:

1. Add missing return type.
2. Replace 'union wait' by int.
3. Use Posix-style signal handling instead of signal().
4. Use fork() instead of deprecated vfork().
5. Block signals before fork()'ing, instead of after.
6. Return -1 if fork() fails, instead of 0.
7. Add EINTR handling for waitpid() call.

Also add claim of Posix conformance to man page.
1996-06-05 00:08:54 +00:00
James Raynard
ccbcef60f5 Code clean up:
Changed type of pid from int to pid_t. (Missed one!)
1996-06-04 17:35:15 +00:00
James Raynard
e75ad74a88 Code clean up:
Changed type of pid from int to pid_t.
1996-06-03 13:19:10 +00:00
James Raynard
0eb3435311 Code clean up:
Added missing headers for system functions.
1996-06-03 13:16:53 +00:00
Joerg Wunsch
d6c9f122c8 Minor corrections. The second parameter is actually of type int
(though only char will be used), and our implementation is not really
worse than the SysV one, so there's no need to claim so in the BUGS
section.
1996-06-03 10:40:39 +00:00
Poul-Henning Kamp
6b5139742c backout yacc changes 1996-06-02 17:10:13 +00:00
Poul-Henning Kamp
15e85e0293 backup yacc changes 1996-06-02 17:08:32 +00:00
Bruce Evans
f05bebb3ad Clean up the FP stack before returning. The i387 exp() leaked an FP
register on its first call.  Subsequent calls reused the register so
the leak didn't accumulate.  Fixes PR 1275.
1996-06-01 18:00:07 +00:00
Bill Paul
a230877213 Make _yp_dobind() a litle smarter:
Now that we preserve RPC handles instead of rebuilding them each time
a ypcln function is called, we have to be careful about keeping our sockets
in a sane state. It's possible that the caller may call a ypclnt
function, and then decide to close all its file descriptors. This would
also close the socket descriptor held by the yplib code. Worse, it
could re-open the same descriptor number for its own use. If it then calls
another ypclnt function, the subsequent RPC will fail because the socket
will either be gone or replaced with Something Completely Different. The
yplib code will recover by rebinding, but it doing so it may wreck the
descriptor which now belongs to the caller.

To fix this, _yp_dobind() needs to label the descriptor somehow so
that it can test it later to make sure it hasn't been altered between
ypclnt calls. It does this by binding the socket, thus associating a port
number with it. It then saves this port number in the dom_local_port member
of the dom_binding structure for the given domain. When _yp_dobind() is
called again (which it is at the start of each ypclnt function), it checks
to see if the domain is already bound, and if it is, it does a getsockname()
on the socket and compares the port number to the one it saved. If the
getsockname() fails, or the port number doesn't match, it abandons the
socket and sets up a new client handle.

This still incurs some syscall overhead, which is what I was trying to
avoid, but it's still not as bad as before.
1996-06-01 05:08:31 +00:00
Bill Paul
217ae63218 Improve NIS performace of getservbyname() and getservbyport(). Both these
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.
1996-06-01 04:40:42 +00:00