summaryrefslogtreecommitdiffstats
path: root/include/rpc
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1997-05-28 04:45:15 +0000
committerwpaul <wpaul@FreeBSD.org>1997-05-28 04:45:15 +0000
commitdb46899f5a13e95008c91bac22a351084b5cd7d1 (patch)
tree5fd284f478e045e9701e047bb8b1dbb0417a483f /include/rpc
parent3be3c101574f9fe0620458248e957eda1de7b9a9 (diff)
downloadFreeBSD-src-db46899f5a13e95008c91bac22a351084b5cd7d1.zip
FreeBSD-src-db46899f5a13e95008c91bac22a351084b5cd7d1.tar.gz
Resolve conflicts.
Diffstat (limited to 'include/rpc')
-rw-r--r--include/rpc/auth.h83
-rw-r--r--include/rpc/auth_unix.h4
-rw-r--r--include/rpc/clnt.h54
-rw-r--r--include/rpc/pmap_clnt.h2
-rw-r--r--include/rpc/pmap_prot.h2
-rw-r--r--include/rpc/pmap_rmt.h2
-rw-r--r--include/rpc/rpc.h4
-rw-r--r--include/rpc/rpc_msg.h2
-rw-r--r--include/rpc/svc.h8
-rw-r--r--include/rpc/svc_auth.h4
-rw-r--r--include/rpc/types.h2
-rw-r--r--include/rpc/xdr.h3
12 files changed, 150 insertions, 20 deletions
diff --git a/include/rpc/auth.h b/include/rpc/auth.h
index 00e1f5e..a6b57c5 100644
--- a/include/rpc/auth.h
+++ b/include/rpc/auth.h
@@ -28,7 +28,7 @@
*
* from: @(#)auth.h 1.17 88/02/08 SMI
* from: @(#)auth.h 2.3 88/08/07 4.0 RPCSRC
- * $Id: auth.h,v 1.11 1997/05/07 20:00:40 eivind Exp $
+ * $Id: auth.h,v 1.6 1996/12/30 13:59:37 peter Exp $
*/
/*
@@ -44,6 +44,7 @@
#ifndef _RPC_AUTH_H
#define _RPC_AUTH_H
#include <sys/cdefs.h>
+#include <sys/socket.h>
#define MAX_AUTH_BYTES 400
#define MAXNETNAMELEN 255 /* maximum length of network user's name */
@@ -170,15 +171,91 @@ struct sockaddr_in;
extern AUTH *authunix_create __P((char *, int, int, int, int *));
extern AUTH *authunix_create_default __P((void));
extern AUTH *authnone_create __P((void));
-extern AUTH *authdes_create __P((char *, u_int,
- struct sockaddr_in *, des_block *));
__END_DECLS
+/* Forward compatibility with TI-RPC */
+#define authsys_create authunix_create
+#define authsys_create_default authunix_create_default
+
+/*
+ * DES style authentication
+ * AUTH *authdes_create(servername, window, timehost, ckey)
+ * char *servername; - network name of server
+ * u_int window; - time to live
+ * struct sockaddr *timehost; - optional hostname to sync with
+ * des_block *ckey; - optional conversation key to use
+ */
+__BEGIN_DECLS
+extern AUTH *authdes_create __P(( char *, u_int, struct sockaddr *, des_block * ));
+#ifdef NOTYET
+/*
+ * TI-RPC supports this call, but it requires the inclusion of
+ * NIS+-specific headers which would require the inclusion of other
+ * headers which would result in a tangled mess. For now, the NIS+
+ * code prototypes this routine internally.
+ */
+extern AUTH *authdes_pk_create __P(( char *, netobj *, u_int,
+ struct sockaddr *, des_block *,
+ nis_server * ));
+#endif
+__END_DECLS
+
+/*
+ * Netname manipulation routines.
+ */
+__BEGIN_DECLS
+extern int netname2user __P(( char *, uid_t *, gid_t *, int *, gid_t *));
+extern int netname2host __P(( char *, char *, int ));
+extern int getnetname __P(( char * ));
+extern int user2netname __P(( char *, uid_t, char * ));
+extern int host2netname __P(( char *, char *, char * ));
+extern void passwd2des __P(( char *, char * ));
+__END_DECLS
+
+/*
+ * Keyserv interface routines.
+ * XXX Should not be here.
+ */
+#ifndef HEXKEYBYTES
+#define HEXKEYBYTES 48
+#endif
+typedef char kbuf[HEXKEYBYTES];
+typedef char *namestr;
+
+struct netstarg {
+ kbuf st_priv_key;
+ kbuf st_pub_key;
+ namestr st_netname;
+};
+
+__BEGIN_DECLS
+extern int key_decryptsession __P(( const char *, des_block * ));
+extern int key_decryptsession_pk __P(( char *, netobj *, des_block * ));
+extern int key_encryptsession __P(( const char *, des_block * ));
+extern int key_encryptsession_pk __P(( char *, netobj *, des_block * ));
+extern int key_gendes __P(( des_block * ));
+extern int key_setsecret __P(( const char * ));
+extern int key_secretkey_is_set __P(( void ));
+extern int key_setnet __P(( struct netstarg * ));
+extern int key_get_conv __P(( char *, des_block * ));
+__END_DECLS
+
+/*
+ * Publickey routines.
+ */
+__BEGIN_DECLS
+extern int getpublickey __P(( char *, char * ));
+extern int getpublicandprivatekey __P(( char *, char * ));
+extern int getsecretkey __P(( char *, char *, char * ));
+__END_DECLS
+
+
#ifndef AUTH_NONE /* Protect against <login_cap.h> */
#define AUTH_NONE 0 /* no authentication */
#endif
#define AUTH_NULL 0 /* backward compatibility */
#define AUTH_UNIX 1 /* unix style (uid, gids) */
+#define AUTH_SYS 1 /* forward compatibility */
#define AUTH_SHORT 2 /* short hand unix style */
#define AUTH_DES 3 /* des style (encrypted timestamps) */
diff --git a/include/rpc/auth_unix.h b/include/rpc/auth_unix.h
index 81f155c..8bb42eb 100644
--- a/include/rpc/auth_unix.h
+++ b/include/rpc/auth_unix.h
@@ -28,7 +28,7 @@
*
* from: @(#)auth_unix.h 1.8 88/02/08 SMI
* from: @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC
- * $Id: auth_unix.h,v 1.7 1997/05/07 02:27:02 eivind Exp $
+ * $Id: auth_unix.h,v 1.4 1996/01/30 23:31:42 mpp Exp $
*/
/*
@@ -66,6 +66,8 @@ struct authunix_parms {
int *aup_gids;
};
+#define authsys_parms authunix_parms
+
__BEGIN_DECLS
extern bool_t xdr_authunix_parms __P((XDR *, struct authunix_parms *));
__END_DECLS
diff --git a/include/rpc/clnt.h b/include/rpc/clnt.h
index 6bddcb7..1025468 100644
--- a/include/rpc/clnt.h
+++ b/include/rpc/clnt.h
@@ -28,7 +28,7 @@
*
* from: @(#)clnt.h 1.31 88/02/08 SMI
* from: @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC
- * $Id: clnt.h,v 1.8 1997/05/07 02:27:04 eivind Exp $
+ * $Id: clnt.h,v 1.5 1996/12/30 13:59:38 peter Exp $
*/
/*
@@ -40,6 +40,7 @@
#ifndef _RPC_CLNT_H_
#define _RPC_CLNT_H_
#include <sys/cdefs.h>
+#include <sys/un.h>
/*
* Rpc calls return an enum clnt_stat. This should be looked at more,
@@ -202,11 +203,30 @@ typedef struct __rpc_client {
#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in))
/*
- * control operations that apply to both udp and tcp transports
+ * control operations that apply to udp, tcp and unix transports
+ *
+ * Note: options marked XXX are no-ops in this implementation of RPC.
+ * The are present in TI-RPC but can't be implemented here since they
+ * depend on the presence of STREAMS/TLI, which we don't have.
+ *
*/
#define CLSET_TIMEOUT 1 /* set timeout (timeval) */
#define CLGET_TIMEOUT 2 /* get timeout (timeval) */
#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */
+#define CLGET_FD 6 /* get connections file descriptor */
+#define CLGET_SVC_ADDR 7 /* get server's address (netbuf) XXX */
+#define CLSET_FD_CLOSE 8 /* close fd while clnt_destroy */
+#define CLSET_FD_NCLOSE 9 /* Do not close fd while clnt_destroy */
+#define CLGET_XID 10 /* Get xid */
+#define CLSET_XID 11 /* Set xid */
+#define CLGET_VERS 12 /* Get version number */
+#define CLSET_VERS 13 /* Set version number */
+#define CLGET_PROG 14 /* Get program number */
+#define CLSET_PROG 15 /* Set program number */
+#define CLSET_SVC_ADDR 16 /* get server's address (netbuf) XXX */
+#define CLSET_PUSH_TIMOD 17 /* push timod if not already present XXX */
+#define CLSET_POP_TIMOD 18 /* pop timod XXX */
+
/*
* udp only control operations
*/
@@ -214,6 +234,12 @@ typedef struct __rpc_client {
#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */
/*
+ * Operations which GSSAPI needs. (Bletch.)
+ */
+#define CLGET_LOCAL_ADDR 19 /* get local addr (sockaddr) */
+
+
+/*
* void
* CLNT_DESTROY(rh);
* CLIENT *rh;
@@ -258,7 +284,8 @@ __END_DECLS
/*
- * Generic client creation routine. Supported protocols are "udp" and "tcp"
+ * Generic client creation routine. Supported protocols are "udp", "tcp"
+ * and "unix".
* CLIENT *
* clnt_create(host, prog, vers, prot);
* char *host; -- hostname
@@ -330,6 +357,27 @@ __END_DECLS
/*
+ * AF_UNIX based rpc
+ * CLIENT *
+ * clntunix_create(raddr, prog, vers, sockp, sendsz, recvsz)
+ * struct sockaddr_un *raddr;
+ * u_long prog;
+ * u_long version;
+ * register int *sockp;
+ * u_int sendsz;
+ * u_int recvsz;
+ */
+__BEGIN_DECLS
+extern CLIENT *clntunix_create __P((struct sockaddr_un *,
+ u_long,
+ u_long,
+ int *,
+ u_int,
+ u_int));
+__END_DECLS
+
+
+/*
* Print why creation failed
*/
__BEGIN_DECLS
diff --git a/include/rpc/pmap_clnt.h b/include/rpc/pmap_clnt.h
index 1d814ae..55c36ac 100644
--- a/include/rpc/pmap_clnt.h
+++ b/include/rpc/pmap_clnt.h
@@ -28,7 +28,7 @@
*
* from: @(#)pmap_clnt.h 1.11 88/02/08 SMI
* from: @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC
- * $Id: pmap_clnt.h,v 1.8 1997/05/07 02:27:05 eivind Exp $
+ * $Id: pmap_clnt.h,v 1.5 1996/12/30 13:59:38 peter Exp $
*/
/*
diff --git a/include/rpc/pmap_prot.h b/include/rpc/pmap_prot.h
index 8cf7989..f4f1967 100644
--- a/include/rpc/pmap_prot.h
+++ b/include/rpc/pmap_prot.h
@@ -28,7 +28,7 @@
*
* from: @(#)pmap_prot.h 1.14 88/02/08 SMI
* from: @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC
- * $Id: pmap_prot.h,v 1.7 1997/05/07 02:27:07 eivind Exp $
+ * $Id: pmap_prot.h,v 1.4 1996/01/30 23:32:08 mpp Exp $
*/
/*
diff --git a/include/rpc/pmap_rmt.h b/include/rpc/pmap_rmt.h
index 336d1de..d76131e 100644
--- a/include/rpc/pmap_rmt.h
+++ b/include/rpc/pmap_rmt.h
@@ -28,7 +28,7 @@
*
* from: @(#)pmap_rmt.h 1.2 88/02/08 SMI
* from: @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC
- * $Id: pmap_rmt.h,v 1.7 1997/05/07 02:27:08 eivind Exp $
+ * $Id: pmap_rmt.h,v 1.4 1996/01/30 23:32:12 mpp Exp $
*/
/*
diff --git a/include/rpc/rpc.h b/include/rpc/rpc.h
index 18543e4..9f5eaec 100644
--- a/include/rpc/rpc.h
+++ b/include/rpc/rpc.h
@@ -28,7 +28,7 @@
*
* from: @(#)rpc.h 1.9 88/02/08 SMI
* from: @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC
- * $Id$
+ * $Id: rpc.h,v 1.6 1996/12/30 13:59:39 peter Exp $
*/
/*
@@ -59,9 +59,7 @@
* Uncomment-out the next line if you are building the rpc library with
* DES Authentication (see the README file in the secure_rpc/ directory).
*/
-#if 0
#include <rpc/auth_des.h> /* protocol for des style cred */
-#endif
/* Server side only remote procedure callee */
#include <rpc/svc.h> /* service manager and multiplexer */
diff --git a/include/rpc/rpc_msg.h b/include/rpc/rpc_msg.h
index 7b8c205..8005dc8 100644
--- a/include/rpc/rpc_msg.h
+++ b/include/rpc/rpc_msg.h
@@ -28,7 +28,7 @@
*
* from: @(#)rpc_msg.h 1.7 86/07/16 SMI
* from: @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC
- * $Id: rpc_msg.h,v 1.9 1997/05/07 02:27:09 eivind Exp $
+ * $Id: rpc_msg.h,v 1.6 1996/12/30 13:59:39 peter Exp $
*/
/*
diff --git a/include/rpc/svc.h b/include/rpc/svc.h
index 3a5ad3b..c6d48b9 100644
--- a/include/rpc/svc.h
+++ b/include/rpc/svc.h
@@ -28,7 +28,7 @@
*
* from: @(#)svc.h 1.20 88/02/08 SMI
* from: @(#)svc.h 2.2 88/07/29 4.0 RPCSRC
- * $Id: svc.h,v 1.10 1997/05/07 02:27:10 eivind Exp $
+ * $Id: svc.h,v 1.6 1996/12/30 13:59:40 peter Exp $
*/
/*
@@ -306,13 +306,15 @@ __END_DECLS
*/
__BEGIN_DECLS
extern SVCXPRT *svctcp_create __P((int, u_int, u_int));
+extern SVCXPRT *svcfd_create __P((int, u_int, u_int));
__END_DECLS
/*
- * Fd based rpc.
+ * AF_UNIX socket based rpc.
*/
__BEGIN_DECLS
-extern SVCXPRT *svcfd_create __P((int, u_int, u_int));
+extern SVCXPRT *svcunix_create __P((int, u_int, u_int, char *));
+extern SVCXPRT *svcunixfd_create __P((int, u_int, u_int));
__END_DECLS
#endif /* !_RPC_SVC_H */
diff --git a/include/rpc/svc_auth.h b/include/rpc/svc_auth.h
index 5e5fe2c..3dd1493 100644
--- a/include/rpc/svc_auth.h
+++ b/include/rpc/svc_auth.h
@@ -28,7 +28,7 @@
*
* from: @(#)svc_auth.h 1.6 86/07/16 SMI
* from: @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC
- * $Id: svc_auth.h,v 1.7 1997/05/07 02:27:10 eivind Exp $
+ * $Id: svc_auth.h,v 1.4 1996/01/30 23:32:36 mpp Exp $
*/
/*
@@ -45,6 +45,8 @@
*/
__BEGIN_DECLS
extern enum auth_stat _authenticate __P((struct svc_req *, struct rpc_msg *));
+extern int svc_auth_reg __P(( register int, enum auth_stat (*)() ));
+extern enum auth_stat _svcauth_des __P(( struct svc_req *, struct rpc_msg * ));
__END_DECLS
#endif /* !_RPC_SVCAUTH_H */
diff --git a/include/rpc/types.h b/include/rpc/types.h
index e520c14..6d7330e 100644
--- a/include/rpc/types.h
+++ b/include/rpc/types.h
@@ -28,7 +28,7 @@
*
* from: @(#)types.h 1.18 87/07/24 SMI
* from: @(#)types.h 2.3 88/08/15 4.0 RPCSRC
- * $Id$
+ * $Id: types.h,v 1.5 1996/12/30 13:59:40 peter Exp $
*/
/*
diff --git a/include/rpc/xdr.h b/include/rpc/xdr.h
index 8ea909b..aab60d9 100644
--- a/include/rpc/xdr.h
+++ b/include/rpc/xdr.h
@@ -28,7 +28,7 @@
*
* from: @(#)xdr.h 1.19 87/04/22 SMI
* from: @(#)xdr.h 2.2 88/07/29 4.0 RPCSRC
- * $Id: xdr.h,v 1.8 1997/05/07 02:27:11 eivind Exp $
+ * $Id: xdr.h,v 1.5 1996/12/30 13:59:41 peter Exp $
*/
/*
@@ -252,6 +252,7 @@ extern bool_t xdr_bytes __P((XDR *, char **, u_int *, u_int));
extern bool_t xdr_opaque __P((XDR *, caddr_t, u_int));
extern bool_t xdr_string __P((XDR *, char **, u_int));
extern bool_t xdr_union __P((XDR *, enum_t *, char *, struct xdr_discrim *, xdrproc_t));
+extern unsigned long xdr_sizeof __P((xdrproc_t, void *));
extern bool_t xdr_char __P((XDR *, char *));
extern bool_t xdr_u_char __P((XDR *, u_char *));
extern bool_t xdr_vector __P((XDR *, char *, u_int, u_int, xdrproc_t));
OpenPOWER on IntegriCloud