Commit Graph

231 Commits

Author SHA1 Message Date
Martin Blapp
b77aeb1292 Kill prototype for __msgwrite too. It is not needed anymore. 2003-06-15 10:55:39 +00:00
Martin Blapp
ce9bc43cb3 Replace the old SCM_CREDS cred procedures. They can now be
replaced just fine with getpeereid() and the whole code
gets a lot simpler. We don't break the ABI, since all server
programms use __rpc_get_local_uid(), and we just change library
internals.

Reviewed by:	des
2003-06-15 10:32:01 +00:00
Martin Blapp
65d06145a2 Don't return -1 and abort if msg.msg_controllen is 0. For
some strange reason recvmsg() never sets errno to EAGAIN
on a non-blocking socket and just returns 0.

Reviewed by:	jhb
Approved by:	re
2003-05-29 22:06:06 +00:00
Martin Blapp
e5cd12556d Fix a problem introduced in the last commit. sa and cm
are not initialized at this place. Move the initializing
before the non-blocking check.

Submitted by:	Marius Strobl <marius@alchemy.franken.de>
Reviewed by:	jhb
Approved by:	re
2003-05-29 19:43:22 +00:00
Martin Blapp
aee2eba2d1 If AF_LOCAL is used, we need to use __msgread_withcred() instead of
just read() in non-blocking mode too. The reason is obvious. NetBSD
uses a complete different way to get the credentials so this patch
only applies to FreeBSD.

Reviewed by:	rwatson
Approved by:	re
2003-05-28 09:16:35 +00:00
Martin Blapp
f8af072548 Fix a simple bug that prevents svc_tli_create to bind to the address
specified by caller.

NetBSD rev. 1.6

Reviewed by:	rwatson
Approved by:	rwatson (re)
Obtained from:	NetBSD
2003-05-18 15:07:25 +00:00
Jacques Vidrine
d05090827f Back out the `hiding' of strlcpy and strlcat. Several people
vocally objected to this safety belt.
2003-05-01 19:03:14 +00:00
Jacques Vidrine
5723e501ab `Hide' strlcpy and strlcat (using the namespace.h / __weak_reference
technique) so that we don't wind up calling into an application's
version if the application defines them.

Inspired by:	qpopper's interfering and buggy version of strlcpy
2003-04-29 21:13:50 +00:00
Jacques Vidrine
d7f15c948f Clean up some signed/unsigned issues in the XDR code.
Obtained from:	OpenBSD
2003-03-07 13:19:40 +00:00
Jacques Vidrine
2bbd7cf820 Eliminate 19 warnings in libc (at level WARNS=2) of the
`implicit declaration of function' variety.
2003-02-27 13:40:01 +00:00
Jacques Vidrine
e0554a531f Eliminate 61 warnings emitted at WARNS=2 (leaving 53 to go).
Only warnings that could be fixed without changing the generated object
code and without restructuring the source code have been handled.

Reviewed by:	/sbin/md5
2003-02-16 17:29:11 +00:00
Philippe Charnier
d649825182 The .Fn function 2003-02-06 11:04:47 +00:00
Martin Blapp
2e26eba4b9 Fix signed/unsigned comparison warnings.
Reviewed by:		phk
Obtained from:		NetBSD
2003-01-27 22:46:50 +00:00
Martin Blapp
3c788545e8 Fix signed/unsigned comparison warnings. Fix spelling error in
comment.

NetBSD Rev. 1.9 and 1.7

Reviewed by:		phk
Obtained from:		NetBSD
2003-01-27 22:45:08 +00:00
Martin Blapp
33e0ae486e Make this work in the !INET6 case -- if we mismatch the AF, don't return a
bogus (uninitialized) structure. Also, ignore v4 ifa's with no broadcast
address (rather than core dumping).

NetBSD Rev 1.8

Reviewed by:		phk
Obtained from:		NetBSD
2003-01-27 22:43:23 +00:00
Martin Blapp
d063ef1461 Check pmap_flag before sendto.
NetBSD r 1.5

Reviewed by:		phk
Obtained from:		NetBSD
2003-01-27 22:38:25 +00:00
Martin Blapp
555f4cffb0 Make sure we don't look before the beginning of the string.
NetBSD Rev 1.5

Reviewed by:		phk
Obtained from:		NetBSD
2003-01-27 22:36:53 +00:00
Martin Blapp
77335102aa Add missing __rpc_fixup_addr. This is needed to make
mount_nfs -T work for scoped addresses.

NetBSD Rev 1.11

Reviewed by:	phk
Obtained from:	NetBSD
2003-01-27 22:27:55 +00:00
Martin Blapp
b951fbe40c Free the correct buffer in error handling.
Handle that malloc may return NULL.

NetBSD Rev. 1.8

Reviewed by:		phk
Obtained from:		NetBSD
2003-01-27 22:22:59 +00:00
Martin Blapp
0ae0e1ea47 Fix namespace pollution introduced in previous commit.
Reviewed by:		phk
2003-01-26 23:01:49 +00:00
Martin Blapp
9790dbfc0f Fix memleak.
Reviewed by:	rwatson
MFC after:	2 weeks
2003-01-16 16:43:58 +00:00
Martin Blapp
08497c026c Implement non-blocking tcp-connections.
Reviewed by:	rwatson
Obtained from:	NetBSD
MFC after:	1 day
2003-01-16 07:13:51 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Ruslan Ermilov
2efeeba554 mdoc(7) police: "The .Fa argument.". 2002-12-19 09:40:28 +00:00
Ruslan Ermilov
1fae73b137 mdoc(7) police: "The .Fn function". 2002-12-18 12:45:11 +00:00
Martin Blapp
fb4c80619a Change the name for the local unix-socket based protocol
from "unix" back to "local".  Add some compat stuff so both
ways work for some time.

Reviewed by:    phk
Approved by:    imp (UPDATING)
Requested by:   iedowse, lukem@netbsd.org
2002-12-16 22:24:26 +00:00
Ruslan Ermilov
8d5d039f80 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
Ruslan Ermilov
c51d717f0c libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
Ruslan Ermilov
ff56972e0e Cosmetics. 2002-10-29 15:00:10 +00:00
Ruslan Ermilov
b382ba4fb1 bsd.doc.mk changes:
Don't gratuitously pipe thru a cat(1) if NODOCCOMPRESS.

Only create _stamp.extra when necessary.

Get rid of SOELIMPP and OBJS.

Use Groff version of soelim(1); we need its -I option
for the following to work.

Don't needlessly chdir to SRCDIR.  Only a few documents
need CD_HACK, and those that need it either use refer(1)
or .PSPIC macro which internally uses the .psbb call.
2002-10-29 14:56:09 +00:00
Ian Dowse
d7cd6ba39b Use kqueue(2) instead of poll(2) to wait for replies and timeouts
in the UDP RPC client code. As a side-effect, this fixes some bugs
that might prevent the RPC call from ever timing out for example
if the server keeps responding with the wrong xid. This could
probably be simplified further by using the EVFILT_TIMER filter.
2002-10-15 22:28:59 +00:00
Bill Fenner
e5b04cee36 Fix documentation of clnt_control()'s CL{GET|SET}_{VERS|XID} to
reflect that they actually require a u_int32_t *, which is not
 necessarily the same as an unsigned long *.
2002-09-16 21:45:37 +00:00
Bruce Evans
80ee2492c5 xdr.3 is added to MAN in ../xdr/Makefile.inc where it belongs, so don't
add it here.
2002-08-19 23:06:00 +00:00
Ruslan Ermilov
bebfe08f18 mdoc(7) police: whitespace nits. 2002-08-09 11:17:56 +00:00
Ian Dowse
bb1ca86f24 Revert part of revision 1.10, as it broke portmap lookups for IPv4
TCP clients. The problem was that a struct netconfig returned by
getnetconfigent() was being treated as a handle for __rpc_getconf(),
which certainly isn't right.

The tirpc-99 code uses __rpc_setconf("udp")/__rpc_getconf() to find
the IPv4 udp netconfig, but our implementation of these functions
seem happy to return IPv6 entries, so we can't use them. By reverting
to the old version, we are hard-coding the name of the udp4 netid.

Tracked down by:	Bakul Shah <bakul@bitblocks.com>
2002-07-26 07:52:21 +00:00
Alfred Perlstein
988553e96a Fix "rpcinfo -m" when talking to other implementations of rpcbind.
Submitted by: mbr (NetBSD PR#15802)
2002-07-14 23:38:37 +00:00
Alfred Perlstein
886ee6f6a5 clnt_vc_create() has const scalar arguments that wind up being modified,
fix it (make them non-const) and update the associated documentation.

Submitted by: mbr
2002-07-14 23:35:04 +00:00
Alfred Perlstein
c549fd466b Cast function args to silence warning.
Submitted by: mbr
2002-07-14 23:20:08 +00:00
Alfred Perlstein
261e68702a Add a prototype for __rpcb_findaddr_timed to silence a warning. 2002-07-14 23:14:08 +00:00
Alfred Perlstein
cffc0b5784 Silence several warnings due to functions that needed to take a void *
having a char * as an argument instead. clnt_dg_control(), clnt_raw_control(),
clnt_vc_control().
2002-07-14 23:14:02 +00:00
Alfred Perlstein
62947a57cc Update manpages to reference 'timed' rpc functions 2002-07-11 22:25:16 +00:00
Alfred Perlstein
4e37855e01 Add functions allowing for the user to specify a timeout for rpc functions.
Update copyrights to reflect where this code was lifted from. (tirpc '99)

Submitted by: mbr
2002-07-11 16:23:04 +00:00
Dima Dorfman
11612afabe s/demon/daemon/ 2002-05-12 00:22:38 +00:00
Dag-Erling Smørgrav
f249dbcc71 Spell void * as void * rather than caddr_t. This is complicated by the
fact that caddr_t is often misspelled as char *.

Sponsored by:	DARPA, NAI Labs
2002-04-28 15:18:50 +00:00
David E. O'Brien
d3d20c8267 Fix the style of the SCM ID's.
I believe have made all of libc .c's as consistent as possible.
2002-03-22 23:18:37 +00:00
David E. O'Brien
74fd44fc19 Fix the style of the SCM ID's.
I believe have made all of libc .h's as consistent as possible.
2002-03-22 23:18:17 +00:00
Alfred Perlstein
b275d8fe48 Constify the first arg to callrpc(3). 2002-03-22 19:19:32 +00:00
David E. O'Brien
1372519b15 Remove multi-line __P() usage. 2002-03-22 09:22:15 +00:00
David E. O'Brien
c05ac53b8b Remove __P() usage. 2002-03-21 22:49:10 +00:00