Commit Graph

200 Commits

Author SHA1 Message Date
christos
ae3564f2ff int -> uid_t, gid_t 1998-11-15 17:24:07 +00:00
matt
ef01540446 Change #ifdef vax to __vax__. 1998-10-19 02:54:57 +00:00
mycroft
982e920022 const poisoning. 1998-07-26 14:13:00 +00:00
mycroft
ad96894bb9 const poisoning. 1998-07-26 13:57:41 +00:00
mycroft
00eb97ddac const poisoning. 1998-07-26 13:16:59 +00:00
mycroft
79788fe0d2 const poisoning. 1998-07-26 12:47:38 +00:00
mycroft
dae9fd960e const poisoning. 1998-07-26 12:35:24 +00:00
mycroft
053e241137 constify some tables. 1998-07-26 11:47:37 +00:00
mycroft
423c2aade7 constify some tables. 1998-07-26 11:38:24 +00:00
msaitoh
1e6012f954 KNF. 1998-07-09 18:15:18 +00:00
mrg
32f519716b - use an array MAXHOSTNAMELEN+1 size to hold hostnames
- ensure hostname from gethostname() is nul-terminated in all cases
- minor KNF
- use MAXHOSTNAMELEN over various other values/defines
- be safe will buffers that hold hostnames
1998-07-06 06:56:06 +00:00
tv
cce0ef1a56 Initialize variable "stat" in case it falls through the timeout "for" loop. 1998-05-23 13:37:26 +00:00
pk
b81c16cec8 If poll(2) times out, report failure. 1998-04-24 11:21:19 +00:00
mrg
512c5be5af add "int" to bare static 1998-03-30 01:15:21 +00:00
jtc
f7ca86bc2d regsterrpc.3 -> registerrpc.3 1998-03-18 01:37:39 +00:00
lukem
46e6c5e813 * in get_myaddress(); always return sockaddr_in containing localhost:PMAP_PORT.
(as recommended in Weiste Venema's portmap5_beta distribution)
* deprecate register
* use memmove instead of bcopy
* KNF includes
* use err/warn() instead of perror/fprintf(stderr,)
* fix some typos
1998-02-13 05:52:11 +00:00
lukem
ce147c1c1c revert; we can't break the existing ABI and API 1998-02-12 01:57:27 +00:00
lukem
a40a10e320 use u_int32_t instead of size_t... 1998-02-11 11:52:52 +00:00
lukem
cb9265e7ca use u_int instead of size_t in clntraw_control (oops!) 1998-02-11 07:50:07 +00:00
lukem
a31739bc01 major cleanup (to sync with changes made in include/rpc/*.h):
* use int32_t, size_t, in_port_t instead of long, u_int, u_short as appropriate
* use uid_t and gid_t instead of int
* KNF, fix typos and spellos
* use const as appropriate
* deprecate register
* use memmove instead of bcopy
* use err/warn()
1998-02-10 04:54:22 +00:00
perry
312aca536f add LIBRARY section to man page 1998-02-05 18:45:17 +00:00
lukem
f44e45ec1a fix tyop 1998-02-03 22:18:01 +00:00
perry
d6b87acb51 <netdb.h> -> <rpc/rpc.h> 1998-02-02 20:18:46 +00:00
lukem
67569086c4 a memory leak can occur when xdr_replymesg() fails, so XDR_FREE in
this case. originally fixed in freebsd in clnt_udp.c, and similar
change to clnt_raw.c made by openbsd.
1998-01-23 14:44:22 +00:00
lukem
bba0660678 * use setsockopt(IP_PORTRANGE_LOW) instead of looping through the
address range (from freebsd).
* enhance the man page to be a bit more useful.
1998-01-14 11:04:17 +00:00
perry
b51ed80fd5 RCS Id Police. 1998-01-09 04:11:49 +00:00
mikel
007afd6dda fix pasto (s/getpwent/getrpcent/); from Tobias Weingartner 1997-12-16 07:48:49 +00:00
mrg
4e252e8c4d add missing .Nm entries. from spz@serpens.swb.de. 1997-11-14 02:04:36 +00:00
jtc
43fa6fe319 If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore.  The library will use those
names internally.  Weak aliases are used to provide the original names
to the API.

This is only the first part of this change.  It is most of the functions
which are implemented in C for all NetBSD ports.  Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.
1997-07-21 14:06:24 +00:00
christos
c63c52b238 Fix RCSID's
Fix gcc warnings.
Add missing prototypes
1997-07-13 20:13:02 +00:00
christos
ee71b4ce7e Fix bug where RPC_VERSMISMATCH was used instead of RPC_MISMATCH.
Fix RCSID's
Fix gcc warnings.
1997-07-13 20:12:12 +00:00
christos
3ec7da00cf Fix uninitialized variable free on error.
Add prototypes
Fix RCSID's
Fix gcc warnings.
1997-07-13 20:09:19 +00:00
christos
b8138fe77b Fix printf format strings.
Fix RCSID's
Fix gcc warnings
Add missing prototypes
1997-07-13 20:08:16 +00:00
christos
1f542a9a8a Fix incorrect arguments in authunix_validate
Add prototypes
Fix gcc warnings
Fix RCSID's
1997-07-13 20:07:36 +00:00
mikel
ba64d71ae7 add missing #; noted by Todd Miller 1997-07-01 06:28:22 +00:00
thorpej
d83d59241e PowerPC is an IEEE floating point system. 1997-03-29 21:04:08 +00:00
mycroft
13038ab3ee Make sure /etc/rpc is *closed* when we're done. 1997-03-13 19:47:42 +00:00
mouse
ff44468136 alternate -> alternative, per PR 2643 1997-03-08 13:36:38 +00:00
mycroft
041d00cdf4 It's not necessary to initialize the `revents' field of struct pollfd. 1997-02-08 04:38:02 +00:00
mrg
9cd5492c02 - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
1997-01-23 14:01:45 +00:00
christos
41b4e57ece fix previous booboo that broke all rpc services... 1996-12-24 21:49:55 +00:00
cgd
77dab094a0 pull in netdb.h and arpa/inet.h, kill local decls. add interpret() proto 1996-12-20 20:49:47 +00:00
cgd
9fc875ff77 unistd.h for prototypes 1996-12-20 20:48:17 +00:00
cgd
ebd5bdf6d5 string.h for prototypes 1996-12-20 20:47:53 +00:00
cgd
8d3c8a8f7c string.h for prototypes, replace K&R declarations with __P protos 1996-12-20 20:25:12 +00:00
cgd
e8cd914914 unistd.h for prototypes, fix a couple of bogus casts to select()'s args 1996-12-20 20:24:36 +00:00
cgd
018a568c63 pull in rpc/pmap_clnt.h for protos 1996-12-20 20:23:22 +00:00
cgd
d3b76936e9 pull in unistd.h for prototypes 1996-12-20 20:17:19 +00:00
cgd
30701b75d0 sysconf() definitions are in unistd.h; use it rather than sys/param.h and
sys/sysctl.h.  (without this, the previous checkin doesn't work.)
1996-12-18 20:57:15 +00:00
mrg
52ae8f7095 oops; use _SC_OPEN_MAX instead of sysctl. 1996-12-18 01:06:37 +00:00
cgd
ac05a6d647 repeat after me: size_t != int, especially when you're taking pointers. 1996-12-17 22:00:39 +00:00
mrg
f6c91ed9ca use poll() instead of select() 1996-12-17 03:55:20 +00:00
mrg
074bac7fd2 use sysctl() instead of getdtablesize() 1996-12-17 03:27:08 +00:00
jtc
0df251764e Changed clnt_{s,}p{errno,error,createerror} so that the functions that
output emit newlines and those that return a pointer to string do not
append them.

The existing behavior was inherited from RPC4.0, but this seems to have
been corrected sometime before SunOS 4.1.

The documentation has been updated to reflect the new behavior.
1996-06-19 20:38:43 +00:00
jtc
b18369b1bb Use memset instead of bzero to clear xports array.
To be strictly conforming, we should iterate through the array and set
each pointer to NULL.  But memset is faster, and can be inlined by the
compiler.  If we ever encounter a machine where a NULL ptr != all bits
zero, we'll have to handle this differently.
1996-05-17 00:32:22 +00:00
pk
8afc84d945 Clear `xports' array after allocation (PR#2424, Arne Juul). 1996-05-16 22:52:21 +00:00
jtc
18ec2ba033 Add explict function return types 1996-03-29 23:00:47 +00:00
mark
39f49db401 Define IEEEFP if we are compiling for the arm32. 1996-02-16 21:14:03 +00:00
mycroft
62b296d0eb Make this work on machines that do not support unaligned memory access.
From der Mouse, PR 1116.
1996-02-08 08:06:05 +00:00
pk
560ec18abf Note return value of get_myaddress(). 1996-01-04 20:09:53 +00:00
pk
33880f275d Return FALSE if get_myaddress() fails. 1996-01-04 20:06:22 +00:00
pk
49ca038962 1) Agree with kernel on format of SIOCGIFCONF results.
2) Return non-zero on error, so RPC clients do not die unexpectedly.
1996-01-04 20:05:04 +00:00
pk
6355031191 Fix typo (Der mouse, PR #1115). 1995-06-05 11:48:26 +00:00
mycroft
5860921eda Fill in sin_len. 1995-06-03 22:37:19 +00:00
cgd
2583d406f9 change some of the rpc "on-the-wire" structures' fields to be explicitly-sized
types.  add xdr_{,u_}int{16,32}_t() functions to convert them.
This is necessary, because things like BPF use the RPC headers to look
at the on-the-wire data, so the headers must accurately represent
what's on the wire, too.
1995-04-29 05:26:31 +00:00
christos
c6284ba067 The typo police "dase" != "case" 1995-04-25 21:41:48 +00:00
jtc
6d97ed4663 Use a switch instead of three if statements in xdr_long() and xdr_u_long(),
gcc generates slightly better code on all of the architectures I checked.
Also changed xdr_wrapstring to return the return value of xdr_string
directly.
1995-04-24 23:33:39 +00:00
cgd
99a919e044 fix typo(?): rpc__errlist usage shouldn't have had two underscores.
Also, cast return types to (char *) to quiet compiler's complaints about
loss of 'const'-ness.
1995-04-24 16:34:39 +00:00
jtc
61207f1472 Changed auth_errmsg() and clnt_sperrno() to access error messages
directly instead of by linear search.
1995-04-21 21:59:52 +00:00
jtc
9f3b5edc71 Don't pass a third argument (LASTUNSIGNED) to xdrproc_t functions ---
they only take two arguments.  Presumably this was done to prevent
problems when users passed xdr_string instead of xdr_wrapstring.
Function prototypes are a better way to fix this "problem".
1995-04-21 21:49:29 +00:00
jtc
29f53fb76f Removed comment that explained that this code is not portable. A better
comment is already present near the top of the file.
1995-04-14 20:34:41 +00:00
jtc
adc4ab0186 Don't pass a third argument (LASTUNSIGNED) to xdrproc_t functions ---
they only take two arguments.  Presumably this was done to prevent
problems when users passed xdr_string instead of xdr_wrapstring.
Function prototypes are a better way to fix this "problem".
1995-04-14 20:30:16 +00:00
jtc
3c565bbea8 Changed bzero to memset.
Changed bcmp to memcmp.
Added #include <string.h> to bring prototypes into scope.
1995-04-14 19:48:20 +00:00
jtc
d1a49b5d27 #include <machine/endian.h>. 1995-03-21 20:54:05 +00:00
cgd
9e15c98955 save my sanity; stop using Id. 1995-02-25 03:01:33 +00:00
jtc
8453143f6d Added \n to end of format strings used by all the perror-like functions.
Added const qualifier to array of error strings.
1995-02-20 21:20:22 +00:00
pk
c6df61219c svc_getreq(): pay attention to registered sockets only. This allows
passing a `fd_set' with unrelated bits set.
1995-01-06 13:05:16 +00:00
mycroft
00f8cda6d6 Remove local definitions of svc_maxfd. 1995-01-04 02:58:45 +00:00
cgd
425d26fd98 fix up for new compiler predefines 1994-12-22 15:02:58 +00:00
cgd
ae9172d6cd specify man pages the new way. 1994-12-22 09:57:51 +00:00
cgd
00676a51e4 type-size sanity 1994-12-20 16:12:10 +00:00
cgd
2e2a3a256a be much more careful with types, and add prototype everything. 1994-12-04 01:12:39 +00:00
jtc
8f2c7fd229 Don't bother checking if errno is in range --- strerror() already does
that.
1994-10-10 04:56:01 +00:00
deraadt
2736881bfb Kill the YP code. 1994-09-15 02:11:17 +00:00
deraadt
215b5c5487 improper handling of recvfrom error return value 1994-08-30 23:59:43 +00:00
deraadt
964007b231 fix my dumb bug 1994-08-23 18:42:10 +00:00
deraadt
da072ba3a5 rpc library no longer uses _rpc_dtablesize() internally -- keeps track
of highest active file descriptor. limit fd usage to FD_SETSIZE, until
a better solution is found. remove non-FD_SETSIZE code.
1994-08-20 00:55:26 +00:00
andrew
8eabc08051 Limit the upper bound of the value returned by _rpc_dtablesize() to not
break select(2) calls.
1994-08-15 07:56:50 +00:00
jtc
b3a04d8a54 Fix definition of xdr_u_char() (PR #364) 1994-08-09 00:50:30 +00:00
cgd
7875181c2d bad cast 1994-04-01 03:53:29 +00:00
cgd
75fe90ae2a don't redefine lseek. just ... DON'T DO IT! 1994-03-28 02:19:44 +00:00
phil
d80b7ef7c7 Changing the ns32000 to ns32k as used in other places. 1994-03-02 18:45:22 +00:00
jtc
bd3bf0fe0d RPCSRC 4.0, which our RPC implementation is derrived from, erroneously
sets a default timeout of 25 seconds in clnt_create().  This bug causes
timeouts specified as the last argument to clnt_call to be ignored.
With this fix, timeouts will be taken from clnt_call() unless the
program sets its own default timeout with clnt_control().
1993-12-10 20:01:45 +00:00
deraadt
f92ccee2e2 should bzero automatic sockaddr's before use 1993-12-05 14:36:48 +00:00
cgd
b950dbff54 fixes from Thomas Eberhardt <thomas@mathematik.uni-Bremen.de> to:
(1) don't clobber the MLINKS variable in rpc
	(2) install the rand48 man page in stdlib
1993-10-19 00:36:16 +00:00
jtc
7675ee015a Change `MAN3 = ...'' to `MAN3 += ...'', so other manpages are built. 1993-10-15 00:39:23 +00:00
cgd
63d7b6778b move the rpc code into libc 1993-10-07 07:29:33 +00:00
mycroft
cda4f8f6ee Add RCS identifiers. 1993-08-01 05:37:30 +00:00
jtc
b0824ed69e include xdr_float & xdr_double with all the other rpc/xdr code in libc.a 1993-06-16 21:30:20 +00:00
deraadt
3fcae026b5 cruel hack to get librpc contents into libc (for yp) 1993-04-26 08:22:34 +00:00