Commit Graph

45 Commits

Author SHA1 Message Date
Bill Paul
e6f9ad0779 Add compatibility functions for the AF_LOCAL RPC transport stuff
that used to live in RPC 4.0. This is needed for yppasswd and
rpc.yppasswdd to work correctly. Patch supplied by Martin Blapp.
2001-10-04 21:03:17 +00:00
Peter Wemm
c7a6361316 Stop gcc's fixincludes making an exception for this file 2001-09-10 01:15:48 +00:00
Ian Dowse
32de72d27f Add a new clnt_control() request `CLSET_CONNECT' that controls
whether or not connect(2) is used for UDP client sockets. The default
is not to connect(), so existing clients will see no change in
behaviour.

The use of connect(2) for UDP clients has a number of advantages:
only replies from the intended address are received, and ICMP errors
pertaining to the connection are reported back to the application.
2001-06-23 19:43:21 +00:00
Bill Paul
65d3c627a5 Add a CLSET_ASYNC command, which allows us to (ab)use the clnt_dg transport
to make asynchronous RPCs. This is needed to help fix ypbind, which can no
longer override the clnt_dg_call() method (formerly the clntudp_call()
method) due to all the internal descriptor locking code in TI-RPC. Turning
on this flag allows us to send an RPC request, then return immediately,
and handle a reply later, rather than being forced to do the request
and reply in a single function call.

Also fix a byte ordering bug: when clnt_dg_call() increments the XID
prior to transmitting a request, it uses the raw value, which is wrong.
The XID is stored in network byte order, i.e. big-endian. The CLSET_XID
and CLGET_XID commands in clnt_dg_control() use ntohl()/htonl() to get
the byte ordering right, but because clnt_dg_call() does not do this,
using CLSET_XID/CLGET_XID doesn't actually work, unless you're on a
big endian host, which we aren't (yet). Fix clnt_dg_call() to byte swap
properly when doing the increment.
2001-03-27 21:27:33 +00:00
Alfred Perlstein
1e799f5341 fix: text following `#else' violates ANSI standard
Pointed out by: ${BDECFLAGS}
2001-03-26 00:35:23 +00:00
Alfred Perlstein
cc74aaddad change callrpc() from taking "char *" args, I'm quite sure they really meant
to use "void *".

remove a duplicate prototype for callrpc() from libexec/ypxfr/ypxfr_extern.h
2001-03-23 16:14:49 +00:00
Alfred Perlstein
922ed94923 forgot prototyle for __rpc_get_local_uid() 2001-03-22 18:44:57 +00:00
Alfred Perlstein
87800257b0 Unbreak LINT.
because rpcb_clnt.h is generated during buildworld and only installed into
/usr/include/rpc (and not present in src/include/rpc) we can fix it
by simply not including it when _KERNEL is defined.

this isn't the most elegant, way and might deserve some revisiting later.

Pointed out by: bde
2001-03-20 10:27:03 +00:00
Alfred Perlstein
edea2cc391 The TI-RPC spammed over a '#ifdef _KERNEL' hack for the xdrproc_t typedef
revert the spammage

Pointed out by: bde
2001-03-20 08:26:22 +00:00
Alfred Perlstein
3e86de8d2c comment out #pragma directive containing Sun SCM tags 2001-03-20 08:20:50 +00:00
Alfred Perlstein
f91b492ae4 Add missing comma when KERBEROS is defined. 2001-03-19 19:36:11 +00:00
Alfred Perlstein
8360efbd6c Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and
associated changes that had to happen to make this possible as well as
bugs fixed along the way.

  Bring in required TLI library routines to support this.

  Since we don't support TLI we've essentially copied what NetBSD
  has done, adding a thin layer to emulate direct the TLI calls
  into BSD socket calls.

  This is mostly from Sun's tirpc release that was made in 1994,
  however some fixes were backported from the 1999 release (supposedly
  only made available after this porting effort was underway).

  The submitter has agreed to continue on and bring us up to the
  1999 release.

  Several key features are introduced with this update:
    Client calls are thread safe. (1999 code has server side thread
    safe)
    Updated, a more modern interface.

  Many userland updates were done to bring the code up to par with
  the recent RPC API.

  There is an update to the pthreads library, a function
  pthread_main_np() was added to emulate a function of Sun's threads
  library.

  While we're at it, bring in NetBSD's lockd, it's been far too
  long of a wait.

  New rpcbind(8) replaces portmap(8) (supporting communication over
  an authenticated Unix-domain socket, and by default only allowing
  set and unset requests over that channel). It's much more secure
  than the old portmapper.

  Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded
  to support TI-RPC and to support IPV6.

  Umount(8) is also fixed to unmount pathnames longer than 80 chars,
  which are currently truncated by the Kernel statfs structure.

Submitted by: Martin Blapp <mb@imp.ch>
Manpage review: ru
Secure RPC implemented by: wpaul
2001-03-19 12:50:13 +00:00
Nick Sayer
e9e8de0698 Back out 1.15. It caused more harm than good. Something, however,
must be done to fix this situation.

Submitted by: bde
2000-07-21 14:49:09 +00:00
Nick Sayer
cbe8602290 Moving forward on my commitment to always make at least one commit from
a terminal room of any conference I attend....

Fix xdrproc_t prototype. () instead of (...) breaks C++ programs.
2000-06-22 01:46:25 +00:00
Yoshinobu Inoue
469bed11ef bindresvport related changes
-changed bindresvport2 to bindresvport_sa
 -merged the man into bindresvport.3

All discussion between Jean-Luc Richier <Jean-Luc.Richier@imag.fr>,
Theo de Raadt <deraadt@cvs.openbsd.org>, itojun, is reflected to
this code. (Actually Theo de Raadt write the code simultaneously as the
discussion change.)
2000-01-26 09:02:42 +00:00
Yoshinobu Inoue
42b4f28ebd libc rcmd update for IPv6.
A new function bindresvport2(), AF independent version of bindresvport()
is also added.

Reviewed by: sumikawa
Obtained from: KAME project
2000-01-13 15:09:48 +00:00
Peter Wemm
c447342094 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 05:07:58 +00:00
Peter Wemm
a4add9a9b1 $Id$ -> $FreeBSD$ 1999-08-27 23:45:13 +00:00
Bill Paul
6ed6e30166 #ifdef out DES ioctls which don't exist in FreeBSD. These originated
with the SunRPC code to allow the use of hardware DES on certain Sun
hardware that supported it (if you installed the appropriate kit). We
don't have them and they apparently break the ioctl table
generation for kdump.

Pointed out by: bde
1998-09-26 01:29:51 +00:00
Bruce Evans
1245e3e02b Don't declare functions without a prototype if KERNEL is defined. This
fixes lots of warnings about missing prototypes in sys/netatm/spans/*.
1998-09-21 02:43:30 +00:00
David E. O'Brien
c304ad8a23 Add support for the RPC 64-bit integer type ``hyper''. 1998-09-08 17:33:12 +00:00
Bruce Evans
59bd6ec5a0 Uncommit the generated file key_prot.h. Install it from where it
is generated.  It must be installed in both /usr/include/rpc/ and
/usr/include/rpcsvc/ for historical reasons.  The generated version
was once missing ANSI prototypes because the wrong flags were passed
to rpcgen, but that is fixed now.  The committed version had `#pragma
indent' which gratuitously broke K&R support.  Apart from this, all
versions before and after this commit are identical.
1998-02-13 03:10:28 +00:00
Bruce Evans
c62130b382 Null change to attach the correct log message for the previous commit:
Added some forward struct declarations so that this file is less
self-insufficent.
Fixed an incomplete prototype.
Fixed some misformattings.
1998-01-16 11:47:51 +00:00
Bruce Evans
9a03398dd1 Added a forward struct declaration so that this file is less
self-insufficent.
1998-01-16 11:46:05 +00:00
Bruce Evans
03061ce6e5 Commented out `#pragma ident' so that the K&R support isn't gratuitously
broken.  This also prevents ANSI compilers from recognizing the pragma
as a request to run /usr/games/hack...
1998-01-16 11:37:54 +00:00
Bruce Evans
2de8d1f69c Removed ifndef of AUTH_NONE. The conflict with login_cap.h was fixed
better by not defining AUTH_NONE in login_cap.h.
1997-08-21 19:31:04 +00:00
Bill Paul
f26dae2bb4 Resolve conflicts. 1997-05-28 04:45:15 +00:00
Bill Paul
08516c6c61 This commit was generated by cvs2svn to compensate for changes in r26209,
which included commits to RCS files with non-trunk default branches.
1997-05-28 04:42:53 +00:00
Bill Paul
f7e2700f42 Step two: import Secure RPC changes to include/rpc.
Reviewed by:	Mark Murray
1997-05-28 04:42:53 +00:00
Peter Wemm
b6e649bc7b fix missing close comment in login_cap additions 1997-05-18 08:12:14 +00:00
Eivind Eklund
f756433e8b Back out all of yesterdays include file changes. 1997-05-07 20:01:10 +00:00
Eivind Eklund
48ea0bec18 Make a lot of include-files self-contained. I excluded the patches changing
int's to gid_t and uid_t - should I commit these, too?

Closes PR misc/2625.

Submitted by:	Julian Assange <proff@iq.org>
1997-05-07 02:27:18 +00:00
Bruce Evans
89ee8ac3d6 Fixed missing __P() to complete the K&R support in this header. 1997-05-07 00:58:23 +00:00
Peter Wemm
79403fe300 Revert $FreeBSD$ to $Id$ 1997-02-23 09:21:14 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Peter Wemm
91f0745a28 Missed prototype for svc_getreqset2() 1996-12-31 09:08:44 +00:00
Peter Wemm
70de0abf48 First commit of a series of cleanups for the libc rpc code which has been
suffering a bad case neglect for the last few years.

- Add full prototypes, including to function pointers.
- Make the wire protocols 64-bit type safe, eg: 32 bit quantities are
  int32_t, not long.  The orginal rpc code was implemented when an int
  could be 16 bits.

Obtained from: a diff of FreeBSD vs. OpenBSD/NetBSD rpc code.
1996-12-30 13:59:41 +00:00
Jeffrey Hsu
128443c87b Remove unnecessary typedef. All inclusions of <rpc/auth.h> in the source
tree are preceded by an inclusion of <rpc/types.h>, so the 32-bit fixed sized
type u_int32_t is already available to us.
1996-01-31 08:02:11 +00:00
Mike Pritchard
71d9c7815e Fix a bunch of spelling errors in the comment fields
of a bunch of system include files.
1996-01-30 23:33:04 +00:00
cvs2svn
0cc3916673 This commit was manufactured by cvs2svn to create branch 'WPAUL'. 1996-01-12 07:03:35 +00:00
Rodney W. Grimes
4399be3cbd Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
Bruce Evans
97f567ae95 Forward-declare `struct rpc_err' so that it isn't declared inside a
prototype when <rpc/clnt.h> isn't included.
1995-03-12 12:13:37 +00:00
Poul-Henning Kamp
e4f13e774e Remove a couple of nested comments. 1995-02-24 08:57:45 +00:00
Garrett Wollman
86b9a9cc2d Use the header files that are compatible with the code just moved over
from 1.1.5.
1994-08-07 18:41:02 +00:00
Garrett Wollman
dba7a33ecc Install RPC headers from include, like they always should have been. 1994-08-04 20:39:34 +00:00