From: neilbrown Date: Tue, 28 Mar 2006 00:53:30 +0000 (+0000) Subject: Use PKGCONFIG to locate gssapi and rpcsecgss header files X-Git-Tag: nfs-utils-1-0-8~11 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=4b4f1c94d87475fd45bb17119a862adb17a067a9;p=nfs-utils.git Use PKGCONFIG to locate gssapi and rpcsecgss header files Instead of having separate copies of the gssapi and rpcsecgss header files, or depending on the Kerberos gssapi header, locate the headers now installed with the libgssapi and librpcsecgss libraries. Remove local copies of the gssapi and rpcsecgss header files. This depends on the configure_use_autotools patch. --- diff --git a/ChangeLog b/ChangeLog index caa472e..b367629 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2006-03-28 kwc@citi.umich.edu + Use PKGCONFIG to locate gssapi and rpcsecgss header files + + Instead of having separate copies of the gssapi and rpcsecgss + header files, or depending on the Kerberos gssapi header, + locate the headers now installed with the libgssapi and librpcsecgss + libraries. + + Remove local copies of the gssapi and rpcsecgss header files. + + This depends on the configure_use_autotools patch. + 2006-03-28 kwc@citi.umich.edu Add debugging to better detect negotiation of enctype not supported by kernel diff --git a/Makefile.am b/Makefile.am index ff6f093..8298aa0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,23 +37,7 @@ EXTRA_DIST = \ \ aclocal/nfs-utils.m4 \ aclocal/kerberos5.m4 \ - aclocal/tcp-wrappers.m4 \ - \ - support/rpc/include/rpc/auth_gss.h \ - support/rpc/include/rpc/auth.h \ - support/rpc/include/rpc/auth_unix.h \ - support/rpc/include/rpc/clnt.h \ - support/rpc/include/rpc/pmap_clnt.h \ - support/rpc/include/rpc/pmap_prot.h \ - support/rpc/include/rpc/pmap_rmt.h \ - support/rpc/include/rpc/rpc_des.h \ - support/rpc/include/rpc/rpc.h \ - support/rpc/include/rpc/rpc_msg.h \ - support/rpc/include/rpc/svc_auth.h \ - support/rpc/include/rpc/svc.h \ - support/rpc/include/rpc/types.h \ - support/rpc/include/rpc/xdr.h - + aclocal/tcp-wrappers.m4 install-data-hook: if [ ! -d $(DESTDIR)$(statedir) ]; then mkdir -p $(DESTDIR)$(statedir); fi diff --git a/configure.in b/configure.in index c971d2e..7ecf213 100644 --- a/configure.in +++ b/configure.in @@ -148,6 +148,15 @@ if test "$enable_nfsv4" = yes; then AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], [AC_MSG_ERROR(libnfsidmap needed for nfsv4 support)]) AC_CHECK_HEADERS(event.h, ,[AC_MSG_ERROR(libevent needed for nfsv4 support)]) AC_CHECK_HEADERS(nfsidmap.h, ,[AC_MSG_ERROR(libnfsidmap needed for nfsv4 support)]) + dnl librpcsecgss already has a dependency on libgssapi, + dnl so we don't need to do an explicit check for libgssapi here + PKG_CHECK_MODULES(RPCSECGSS, librpcsecgss, [], + [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss. + If you have pkgconfig installed, you might try setting environment + variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig]) + ] + ) + fi if test "$knfsd_cv_glibc2" = no; then AC_CHECK_LIB(bsd, daemon, [LIBBSD="-lbsd"]) @@ -166,7 +175,7 @@ if test "$enable_gss" = yes; then AC_KERBEROS_V5 dnl This is not done until here because we need to have KRBLIBS set - dnl "librpcsecgss=1" is so that it doesn't get added to LIBS + dnl ("librpcsecgss=1" is so that it doesn't get added to LIBS) AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], [AC_MSG_ERROR(librpcsecgss needed for nfsv4 support)], $KRBLIBS) AC_CHECK_LIB(rpcsecgss, authgss_set_debug_level, AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, $KRBLIBS) diff --git a/support/include/gssapi/gssapi.h b/support/include/gssapi/gssapi.h deleted file mode 100644 index 22cd329..0000000 --- a/support/include/gssapi/gssapi.h +++ /dev/null @@ -1,826 +0,0 @@ -/* - * Copyright 1993 by OpenVision Technologies, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appears in all copies and - * that both that copyright notice and this permission notice appear in - * supporting documentation, and that the name of OpenVision not be used - * in advertising or publicity pertaining to distribution of the software - * without specific, written prior permission. OpenVision makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - * OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF - * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR - * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#ifndef _GSSAPI_H_ -#define _GSSAPI_H_ - -#include "config.h" - -/* - * Determine platform-dependent configuration. - */ - -#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__)) - #include - #if TARGET_RT_MAC_CFM - #error "Use KfM 4.0 SDK headers for CFM compilation." - #endif - - /* This is an API divergence in 1.2.3. This will be reconciled in 1.3, when - all platforms will have RFC-compliant OID declarations. */ - #define GSS_RFC_COMPLIANT_OIDS 1 -#else - #define GSS_RFC_COMPLIANT_OIDS 0 -#endif - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#if TARGET_OS_MAC - #if defined(__MWERKS__) - #pragma import on - #pragma enumsalwaysint on - #endif - #pragma options align=mac68k -#endif - -#if defined(_MSDOS) || defined(_WIN32) -#include -#endif - -/* #ifndef KRB5_CALLCONV */ -#define KRB5_CALLCONV -#define KRB5_CALLCONV_C -#define KRB5_DLLIMP -#define GSS_DLLIMP -#define KRB5_EXPORTVAR -/* #endif */ -#ifndef FAR -#define FAR -#define NEAR -#endif - -#define GSS_SIZEOF_INT SIZEOF_INT -#define GSS_SIZEOF_LONG SIZEOF_LONG -#define GSS_SIZEOF_SHORT SIZEOF_SHORT - -/* - * Make sure we have a definition for PROTOTYPE. - */ -#if !defined(PROTOTYPE) -#if defined(__STDC__) || defined(__cplusplus) || defined(_MSDOS) || defined(_WIN32) || defined(__ultrix) -#define PROTOTYPE(x) x -#else -#define PROTOTYPE(x) () -#endif -#endif - -/* - * First, include stddef.h to get size_t defined. - */ -#if HAVE_STDDEF_H -#include -#endif /* HAVE_STDDEF_H */ - -/* - * POSIX says that sys/types.h is where size_t is defined. - */ -#ifndef macintosh -#include -#endif - -/* - * If the platform supports the xom.h header file, it should be included here. - */ -#if HAVE_XOM_H -#include -#endif /* HAVE_XOM_H */ - -/* - * $Id: gssapi.h,v 1.2 2005/08/26 01:20:12 neilbrown Exp $ - */ - -/* - * First, define the three platform-dependent pointer types. - */ - -typedef void FAR * gss_name_t; -typedef void FAR * gss_cred_id_t; -typedef void FAR * gss_ctx_id_t; - -/* - * The following type must be defined as the smallest natural unsigned integer - * supported by the platform that has at least 32 bits of precision. - */ -#if (GSS_SIZEOF_SHORT == 4) -typedef unsigned short gss_uint32; -typedef short gss_int32; -#elif (GSS_SIZEOF_INT == 4) -typedef unsigned int gss_uint32; -typedef int gss_int32; -#elif (GSS_SIZEOF_LONG == 4) -typedef unsigned long gss_uint32; -typedef long gss_int32; -#endif - -#ifdef OM_STRING -/* - * We have included the xom.h header file. Use the definition for - * OM_object identifier. - */ -typedef OM_object_identifier gss_OID_desc, *gss_OID; -#else /* OM_STRING */ -/* - * We can't use X/Open definitions, so roll our own. - */ -typedef gss_uint32 OM_uint32; - -typedef struct gss_OID_desc_struct { - OM_uint32 length; - void FAR *elements; -} gss_OID_desc, FAR *gss_OID; -#endif /* OM_STRING */ - -typedef struct gss_OID_set_desc_struct { - size_t count; - gss_OID elements; -} gss_OID_set_desc, FAR *gss_OID_set; - -typedef struct gss_buffer_desc_struct { - size_t length; - void FAR *value; -} gss_buffer_desc, FAR *gss_buffer_t; - -typedef struct gss_channel_bindings_struct { - OM_uint32 initiator_addrtype; - gss_buffer_desc initiator_address; - OM_uint32 acceptor_addrtype; - gss_buffer_desc acceptor_address; - gss_buffer_desc application_data; -} FAR *gss_channel_bindings_t; - -/* - * For now, define a QOP-type as an OM_uint32 (pending resolution of ongoing - * discussions). - */ -typedef OM_uint32 gss_qop_t; -typedef int gss_cred_usage_t; - -/* - * Flag bits for context-level services. - */ -#define GSS_C_DELEG_FLAG 1 -#define GSS_C_MUTUAL_FLAG 2 -#define GSS_C_REPLAY_FLAG 4 -#define GSS_C_SEQUENCE_FLAG 8 -#define GSS_C_CONF_FLAG 16 -#define GSS_C_INTEG_FLAG 32 -#define GSS_C_ANON_FLAG 64 -#define GSS_C_PROT_READY_FLAG 128 -#define GSS_C_TRANS_FLAG 256 - -/* - * Credential usage options - */ -#define GSS_C_BOTH 0 -#define GSS_C_INITIATE 1 -#define GSS_C_ACCEPT 2 - -/* - * Status code types for gss_display_status - */ -#define GSS_C_GSS_CODE 1 -#define GSS_C_MECH_CODE 2 - -/* - * The constant definitions for channel-bindings address families - */ -#define GSS_C_AF_UNSPEC 0 -#define GSS_C_AF_LOCAL 1 -#define GSS_C_AF_INET 2 -#define GSS_C_AF_IMPLINK 3 -#define GSS_C_AF_PUP 4 -#define GSS_C_AF_CHAOS 5 -#define GSS_C_AF_NS 6 -#define GSS_C_AF_NBS 7 -#define GSS_C_AF_ECMA 8 -#define GSS_C_AF_DATAKIT 9 -#define GSS_C_AF_CCITT 10 -#define GSS_C_AF_SNA 11 -#define GSS_C_AF_DECnet 12 -#define GSS_C_AF_DLI 13 -#define GSS_C_AF_LAT 14 -#define GSS_C_AF_HYLINK 15 -#define GSS_C_AF_APPLETALK 16 -#define GSS_C_AF_BSC 17 -#define GSS_C_AF_DSS 18 -#define GSS_C_AF_OSI 19 -#define GSS_C_AF_X25 21 - -#define GSS_C_AF_NULLADDR 255 - -/* - * Various Null values. - */ -#define GSS_C_NO_NAME ((gss_name_t) 0) -#define GSS_C_NO_BUFFER ((gss_buffer_t) 0) -#define GSS_C_NO_OID ((gss_OID) 0) -#define GSS_C_NO_OID_SET ((gss_OID_set) 0) -#define GSS_C_NO_CONTEXT ((gss_ctx_id_t) 0) -#define GSS_C_NO_CREDENTIAL ((gss_cred_id_t) 0) -#define GSS_C_NO_CHANNEL_BINDINGS ((gss_channel_bindings_t) 0) -#define GSS_C_EMPTY_BUFFER {0, NULL} - -/* - * Some alternate names for a couple of the above values. These are defined - * for V1 compatibility. - */ -#define GSS_C_NULL_OID GSS_C_NO_OID -#define GSS_C_NULL_OID_SET GSS_C_NO_OID_SET - -/* - * Define the default Quality of Protection for per-message services. Note - * that an implementation that offers multiple levels of QOP may either reserve - * a value (for example zero, as assumed here) to mean "default protection", or - * alternatively may simply equate GSS_C_QOP_DEFAULT to a specific explicit - * QOP value. However a value of 0 should always be interpreted by a GSSAPI - * implementation as a request for the default protection level. - */ -#define GSS_C_QOP_DEFAULT 0 - -/* - * Expiration time of 2^32-1 seconds means infinite lifetime for a - * credential or security context - */ -#define GSS_C_INDEFINITE ((OM_uint32) 0xfffffffful) - - -/* Major status codes */ - -#define GSS_S_COMPLETE 0 - -/* - * Some "helper" definitions to make the status code macros obvious. - */ -#define GSS_C_CALLING_ERROR_OFFSET 24 -#define GSS_C_ROUTINE_ERROR_OFFSET 16 -#define GSS_C_SUPPLEMENTARY_OFFSET 0 -#define GSS_C_CALLING_ERROR_MASK ((OM_uint32) 0377ul) -#define GSS_C_ROUTINE_ERROR_MASK ((OM_uint32) 0377ul) -#define GSS_C_SUPPLEMENTARY_MASK ((OM_uint32) 0177777ul) - -/* - * The macros that test status codes for error conditions. Note that the - * GSS_ERROR() macro has changed slightly from the V1 GSSAPI so that it now - * evaluates its argument only once. - */ -#define GSS_CALLING_ERROR(x) \ - ((x) & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET)) -#define GSS_ROUTINE_ERROR(x) \ - ((x) & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)) -#define GSS_SUPPLEMENTARY_INFO(x) \ - ((x) & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET)) -#define GSS_ERROR(x) \ - ((x) & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \ - (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))) - -/* - * Now the actual status code definitions - */ - -/* - * Calling errors: - */ -#define GSS_S_CALL_INACCESSIBLE_READ \ - (((OM_uint32) 1ul) << GSS_C_CALLING_ERROR_OFFSET) -#define GSS_S_CALL_INACCESSIBLE_WRITE \ - (((OM_uint32) 2ul) << GSS_C_CALLING_ERROR_OFFSET) -#define GSS_S_CALL_BAD_STRUCTURE \ - (((OM_uint32) 3ul) << GSS_C_CALLING_ERROR_OFFSET) - -/* - * Routine errors: - */ -#define GSS_S_BAD_MECH (((OM_uint32) 1ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_NAME (((OM_uint32) 2ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_NAMETYPE (((OM_uint32) 3ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_BINDINGS (((OM_uint32) 4ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_STATUS (((OM_uint32) 5ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_SIG (((OM_uint32) 6ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_NO_CRED (((OM_uint32) 7ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_NO_CONTEXT (((OM_uint32) 8ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_DEFECTIVE_TOKEN (((OM_uint32) 9ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_DEFECTIVE_CREDENTIAL \ - (((OM_uint32) 10ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_CREDENTIALS_EXPIRED \ - (((OM_uint32) 11ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_CONTEXT_EXPIRED \ - (((OM_uint32) 12ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_FAILURE (((OM_uint32) 13ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_BAD_QOP (((OM_uint32) 14ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_UNAUTHORIZED (((OM_uint32) 15ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_UNAVAILABLE (((OM_uint32) 16ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_DUPLICATE_ELEMENT \ - (((OM_uint32) 17ul) << GSS_C_ROUTINE_ERROR_OFFSET) -#define GSS_S_NAME_NOT_MN \ - (((OM_uint32) 18ul) << GSS_C_ROUTINE_ERROR_OFFSET) - -/* - * Supplementary info bits: - */ -#define GSS_S_CONTINUE_NEEDED (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 0)) -#define GSS_S_DUPLICATE_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 1)) -#define GSS_S_OLD_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 2)) -#define GSS_S_UNSEQ_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 3)) -#define GSS_S_GAP_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 4)) - - -/* - * Finally, function prototypes for the GSSAPI routines. - */ - -/* Reserved static storage for GSS_oids. Comments are quotes from RFC 2744. - * - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x01"}, - * corresponding to an object-identifier value of - * {iso(1) member-body(2) United States(840) mit(113554) - * infosys(1) gssapi(2) generic(1) user_name(1)}. The constant - * GSS_C_NT_USER_NAME should be initialized to point - * to that gss_OID_desc. - */ -extern const gss_OID_desc * const GSS_C_NT_USER_NAME; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x02"}, - * corresponding to an object-identifier value of - * {iso(1) member-body(2) United States(840) mit(113554) - * infosys(1) gssapi(2) generic(1) machine_uid_name(2)}. - * The constant GSS_C_NT_MACHINE_UID_NAME should be - * initialized to point to that gss_OID_desc. - */ -extern const gss_OID_desc * const GSS_C_NT_MACHINE_UID_NAME; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {10, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x01\x03"}, - * corresponding to an object-identifier value of - * {iso(1) member-body(2) United States(840) mit(113554) - * infosys(1) gssapi(2) generic(1) string_uid_name(3)}. - * The constant GSS_C_NT_STRING_UID_NAME should be - * initialized to point to that gss_OID_desc. - */ -extern const gss_OID_desc * const GSS_C_NT_STRING_UID_NAME; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {6, (void *)"\x2b\x06\x01\x05\x06\x02"}, - * corresponding to an object-identifier value of - * {iso(1) org(3) dod(6) internet(1) security(5) - * nametypes(6) gss-host-based-services(2)). The constant - * GSS_C_NT_HOSTBASED_SERVICE_X should be initialized to point - * to that gss_OID_desc. This is a deprecated OID value, and - * implementations wishing to support hostbased-service names - * should instead use the GSS_C_NT_HOSTBASED_SERVICE OID, - * defined below, to identify such names; - * GSS_C_NT_HOSTBASED_SERVICE_X should be accepted a synonym - * for GSS_C_NT_HOSTBASED_SERVICE when presented as an input - * parameter, but should not be emitted by GSS-API - * implementations -GSS_DLLIMP extern gss_OID GSS_C_NT_HOSTBASED_SERVICE_X; - */ - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {10, (void *)"\x2a\x86\x48\x86\xf7\x12" - * "\x01\x02\x01\x04"}, corresponding to an - * object-identifier value of {iso(1) member-body(2) - * Unites States(840) mit(113554) infosys(1) gssapi(2) - * generic(1) service_name(4)}. The constant - * GSS_C_NT_HOSTBASED_SERVICE should be initialized - * to point to that gss_OID_desc. - */ -extern const gss_OID_desc * const GSS_C_NT_HOSTBASED_SERVICE; - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {6, (void *)"\x2b\x06\01\x05\x06\x03"}, - * corresponding to an object identifier value of - * {1(iso), 3(org), 6(dod), 1(internet), 5(security), - * 6(nametypes), 3(gss-anonymous-name)}. The constant - * and GSS_C_NT_ANONYMOUS should be initialized to point - * to that gss_OID_desc. - */ -extern const gss_OID_desc * const GSS_C_NT_ANONYMOUS; - - -/* - * The implementation must reserve static storage for a - * gss_OID_desc object containing the value - * {6, (void *)"\x2b\x06\x01\x05\x06\x04"}, - * corresponding to an object-identifier value of - * {1(iso), 3(org), 6(dod), 1(internet), 5(security), - * 6(nametypes), 4(gss-api-exported-name)}. The constant - * GSS_C_NT_EXPORT_NAME should be initialized to point - * to that gss_OID_desc. - */ -extern const gss_OID_desc * const GSS_C_NT_EXPORT_NAME; - - -/* Function Prototypes */ - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_acquire_cred -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_name_t, /* desired_name */ - OM_uint32, /* time_req */ - gss_OID_set, /* desired_mechs */ - gss_cred_usage_t, /* cred_usage */ - gss_cred_id_t FAR *, /* output_cred_handle */ - gss_OID_set FAR *, /* actual_mechs */ - OM_uint32 FAR * /* time_rec */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_release_cred -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_cred_id_t FAR * /* cred_handle */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_init_sec_context -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_cred_id_t, /* claimant_cred_handle */ - gss_ctx_id_t FAR *, /* context_handle */ - gss_name_t, /* target_name */ - gss_OID, /* mech_type (used to be const) */ - OM_uint32, /* req_flags */ - OM_uint32, /* time_req */ - gss_channel_bindings_t, /* input_chan_bindings */ - gss_buffer_t, /* input_token */ - gss_OID FAR *, /* actual_mech_type */ - gss_buffer_t, /* output_token */ - OM_uint32 FAR *, /* ret_flags */ - OM_uint32 FAR * /* time_rec */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_accept_sec_context -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t FAR *, /* context_handle */ - gss_cred_id_t, /* acceptor_cred_handle */ - gss_buffer_t, /* input_token_buffer */ - gss_channel_bindings_t, /* input_chan_bindings */ - gss_name_t FAR *, /* src_name */ - gss_OID FAR *, /* mech_type */ - gss_buffer_t, /* output_token */ - OM_uint32 FAR *, /* ret_flags */ - OM_uint32 FAR *, /* time_rec */ - gss_cred_id_t FAR * /* delegated_cred_handle */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_process_context_token -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - gss_buffer_t /* token_buffer */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_delete_sec_context -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t FAR *, /* context_handle */ - gss_buffer_t /* output_token */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_context_time -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - OM_uint32 FAR * /* time_rec */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_get_mic -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - gss_qop_t, /* qop_req */ - gss_buffer_t, /* message_buffer */ - gss_buffer_t /* message_token */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_verify_mic -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - gss_buffer_t, /* message_buffer */ - gss_buffer_t, /* message_token */ - gss_qop_t * /* qop_state */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_wrap -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - int, /* conf_req_flag */ - gss_qop_t, /* qop_req */ - gss_buffer_t, /* input_message_buffer */ - int FAR *, /* conf_state */ - gss_buffer_t /* output_message_buffer */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_unwrap -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - gss_buffer_t, /* input_message_buffer */ - gss_buffer_t, /* output_message_buffer */ - int FAR *, /* conf_state */ - gss_qop_t FAR * /* qop_state */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_display_status -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - OM_uint32, /* status_value */ - int, /* status_type */ - gss_OID, /* mech_type (used to be const) */ - OM_uint32 FAR *, /* message_context */ - gss_buffer_t /* status_string */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_indicate_mechs -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_OID_set FAR * /* mech_set */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_compare_name -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_name_t, /* name1 */ - gss_name_t, /* name2 */ - int FAR * /* name_equal */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_display_name -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_name_t, /* input_name */ - gss_buffer_t, /* output_name_buffer */ - gss_OID FAR * /* output_name_type */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_import_name -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_buffer_t, /* input_name_buffer */ - gss_OID, /* input_name_type(used to be const) */ - gss_name_t FAR * /* output_name */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_release_name -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_name_t FAR * /* input_name */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_release_buffer -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_buffer_t /* buffer */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_release_oid_set -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_OID_set FAR * /* set */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_inquire_cred -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_cred_id_t, /* cred_handle */ - gss_name_t FAR *, /* name */ - OM_uint32 FAR *, /* lifetime */ - gss_cred_usage_t FAR *, /* cred_usage */ - gss_OID_set FAR * /* mechanisms */ - )); - -/* Last argument new for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_inquire_context -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - gss_name_t FAR *, /* src_name */ - gss_name_t FAR *, /* targ_name */ - OM_uint32 FAR *, /* lifetime_rec */ - gss_OID FAR *, /* mech_type */ - OM_uint32 FAR *, /* ctx_flags */ - int FAR *, /* locally_initiated */ - int FAR * /* open */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_wrap_size_limit -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - int, /* conf_req_flag */ - gss_qop_t, /* qop_req */ - OM_uint32, /* req_output_size */ - OM_uint32 * /* max_input_size */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_import_name_object -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - void FAR *, /* input_name */ - gss_OID, /* input_name_type */ - gss_name_t FAR * /* output_name */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_export_name_object -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_name_t, /* input_name */ - gss_OID, /* desired_name_type */ - void FAR * FAR * /* output_name */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_add_cred -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_cred_id_t, /* input_cred_handle */ - gss_name_t, /* desired_name */ - gss_OID, /* desired_mech */ - gss_cred_usage_t, /* cred_usage */ - OM_uint32, /* initiator_time_req */ - OM_uint32, /* acceptor_time_req */ - gss_cred_id_t FAR *, /* output_cred_handle */ - gss_OID_set FAR *, /* actual_mechs */ - OM_uint32 FAR *, /* initiator_time_rec */ - OM_uint32 FAR * /* acceptor_time_rec */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_inquire_cred_by_mech -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_cred_id_t, /* cred_handle */ - gss_OID, /* mech_type */ - gss_name_t FAR *, /* name */ - OM_uint32 FAR *, /* initiator_lifetime */ - OM_uint32 FAR *, /* acceptor_lifetime */ - gss_cred_usage_t FAR * /* cred_usage */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_export_sec_context -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t FAR *, /* context_handle */ - gss_buffer_t /* interprocess_token */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_import_sec_context -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_buffer_t, /* interprocess_token */ - gss_ctx_id_t FAR * /* context_handle */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_release_oid -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_OID FAR * /* oid */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_create_empty_oid_set -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_OID_set FAR * /* oid_set */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_add_oid_set_member -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_OID, /* member_oid */ - gss_OID_set FAR * /* oid_set */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_test_oid_set_member -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_OID, /* member */ - gss_OID_set, /* set */ - int FAR * /* present */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_str_to_oid -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_buffer_t, /* oid_str */ - gss_OID FAR * /* oid */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_oid_to_str -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_OID, /* oid */ - gss_buffer_t /* oid_str */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_inquire_names_for_mech -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_OID, /* mechanism */ - gss_OID_set FAR * /* name_types */ - )); - -/* - * The following routines are obsolete variants of gss_get_mic, gss_wrap, - * gss_verify_mic and gss_unwrap. They should be provided by GSSAPI V2 - * implementations for backwards compatibility with V1 applications. Distinct - * entrypoints (as opposed to #defines) should be provided, to allow GSSAPI - * V1 applications to link against GSSAPI V2 implementations. - */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_sign -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - int, /* qop_req */ - gss_buffer_t, /* message_buffer */ - gss_buffer_t /* message_token */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_verify -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - gss_buffer_t, /* message_buffer */ - gss_buffer_t, /* token_buffer */ - int FAR * /* qop_state */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_seal -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - int, /* conf_req_flag */ - int, /* qop_req */ - gss_buffer_t, /* input_message_buffer */ - int FAR *, /* conf_state */ - gss_buffer_t /* output_message_buffer */ - )); - -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_unseal -PROTOTYPE( (OM_uint32 FAR *, /* minor_status */ - gss_ctx_id_t, /* context_handle */ - gss_buffer_t, /* input_message_buffer */ - gss_buffer_t, /* output_message_buffer */ - int FAR *, /* conf_state */ - int FAR * /* qop_state */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_export_name -PROTOTYPE( (OM_uint32 *, /* minor_status */ - const gss_name_t, /* input_name */ - gss_buffer_t /* exported_name */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_duplicate_name -PROTOTYPE( (OM_uint32 *, /* minor_status */ - const gss_name_t, /* input_name */ - gss_name_t * /* dest_name */ - )); - -/* New for V2 */ -GSS_DLLIMP OM_uint32 KRB5_CALLCONV gss_canonicalize_name -PROTOTYPE( (OM_uint32 *, /* minor_status */ - const gss_name_t, /* input_name */ - const gss_OID, /* mech_type */ - gss_name_t * /* output_name */ - )); - -#if TARGET_OS_MAC - #if defined(__MWERKS__) - #pragma enumsalwaysint reset - #pragma import reset - #endif - #pragma options align=reset -#endif - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -/* XXXX these are not part of the GSSAPI C bindings! (but should be) */ - -#define GSS_CALLING_ERROR_FIELD(x) \ - (((x) >> GSS_C_CALLING_ERROR_OFFSET) & GSS_C_CALLING_ERROR_MASK) -#define GSS_ROUTINE_ERROR_FIELD(x) \ - (((x) >> GSS_C_ROUTINE_ERROR_OFFSET) & GSS_C_ROUTINE_ERROR_MASK) -#define GSS_SUPPLEMENTARY_INFO_FIELD(x) \ - (((x) >> GSS_C_SUPPLEMENTARY_OFFSET) & GSS_C_SUPPLEMENTARY_MASK) - -/* XXXX This is a necessary evil until the spec is fixed */ -#define GSS_S_CRED_UNAVAIL GSS_S_FAILURE - -#endif /* _GSSAPI_H_ */ diff --git a/support/rpc/include/rpc/Makefile.am b/support/rpc/include/rpc/Makefile.am deleted file mode 100644 index 2928664..0000000 --- a/support/rpc/include/rpc/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -## Process this file with automake to produce Makefile.in - -noinst_HEADERS = \ - auth_gss.h \ - auth.h \ - auth_unix.h \ - clnt.h \ - pmap_clnt.h \ - pmap_prot.h \ - pmap_rmt.h \ - rpc.h \ - rpc_des.h \ - rpc_msg.h \ - svc.h \ - svc_auth.h \ - types.h \ - xdr.h diff --git a/support/rpc/include/rpc/auth.h b/support/rpc/include/rpc/auth.h deleted file mode 100644 index 5924ce6..0000000 --- a/support/rpc/include/rpc/auth.h +++ /dev/null @@ -1,216 +0,0 @@ -/* $OpenBSD: auth.h,v 1.2 1997/09/21 10:46:09 niklas Exp $ */ -/* $NetBSD: auth.h,v 1.7 1995/04/29 05:27:55 cgd Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)auth.h 1.17 88/02/08 SMI - * @(#)auth.h 2.3 88/08/07 4.0 RPCSRC - */ - -/* - * auth.h, Authentication interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - * - * The data structures are completely opaque to the client. The client - * is required to pass a AUTH * to routines that create rpc - * "sessions". - */ - -#ifndef _RPC_AUTH_H -#define _RPC_AUTH_H -#include - -#define MAX_AUTH_BYTES 400 -#define MAXNETNAMELEN 255 /* maximum length of network user's name */ - -/* - * Status returned from authentication check - */ -enum auth_stat { - AUTH_OK=0, - /* - * failed at remote end - */ - AUTH_BADCRED=1, /* bogus credentials (seal broken) */ - AUTH_REJECTEDCRED=2, /* client should begin new session */ - AUTH_BADVERF=3, /* bogus verifier (seal broken) */ - AUTH_REJECTEDVERF=4, /* verifier expired or was replayed */ - AUTH_TOOWEAK=5, /* rejected due to security reasons */ - /* - * failed locally - */ - AUTH_INVALIDRESP=6, /* bogus response verifier */ - AUTH_FAILED=7, /* some unknown reason */ - /* - * RPCSEC_GSS errors - */ - RPCSEC_GSS_CREDPROBLEM = 13, - RPCSEC_GSS_CTXPROBLEM = 14 -}; - -typedef u_int32_t u_int32; /* 32-bit unsigned integers */ - -union des_block { - struct { - u_int32 high; - u_int32 low; - } key; - char c[8]; -}; -typedef union des_block des_block; -__BEGIN_DECLS -extern bool_t xdr_des_block __P((XDR *, des_block *)); -__END_DECLS - -/* - * Authentication info. Opaque to client. - */ -struct opaque_auth { - enum_t oa_flavor; /* flavor of auth */ - caddr_t oa_base; /* address of more auth stuff */ - u_int oa_length; /* not to exceed MAX_AUTH_BYTES */ -}; - - -/* - * Auth handle, interface to client side authenticators. - */ -typedef struct __rpc_auth { - struct opaque_auth ah_cred; - struct opaque_auth ah_verf; - union des_block ah_key; - struct auth_ops { - void (*ah_nextverf) __P((struct __rpc_auth *)); - /* nextverf & serialize */ - int (*ah_marshal) __P((struct __rpc_auth *, XDR *)); - /* validate verifier */ - int (*ah_validate) __P((struct __rpc_auth *, - struct opaque_auth *)); - /* refresh credentials */ - int (*ah_refresh) __P((struct __rpc_auth *)); - /* destroy this structure */ - void (*ah_destroy) __P((struct __rpc_auth *)); - /* encode data for wire */ - int (*ah_wrap) __P((struct __rpc_auth *, XDR *, xdrproc_t, caddr_t)); - /* decode data for wire */ - int (*ah_unwrap) __P((struct __rpc_auth *, XDR *, xdrproc_t, caddr_t)); - - } *ah_ops; - caddr_t ah_private; -} AUTH; - - -/* - * Authentication ops. - * The ops and the auth handle provide the interface to the authenticators. - * - * AUTH *auth; - * XDR *xdrs; - * struct opaque_auth verf; - */ -#define AUTH_NEXTVERF(auth) \ - ((*((auth)->ah_ops->ah_nextverf))(auth)) -#define auth_nextverf(auth) \ - ((*((auth)->ah_ops->ah_nextverf))(auth)) - -#define AUTH_MARSHALL(auth, xdrs) \ - ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) -#define auth_marshall(auth, xdrs) \ - ((*((auth)->ah_ops->ah_marshal))(auth, xdrs)) - -#define AUTH_VALIDATE(auth, verfp) \ - ((*((auth)->ah_ops->ah_validate))((auth), verfp)) -#define auth_validate(auth, verfp) \ - ((*((auth)->ah_ops->ah_validate))((auth), verfp)) - -#define AUTH_REFRESH(auth) \ - ((*((auth)->ah_ops->ah_refresh))(auth)) -#define auth_refresh(auth) \ - ((*((auth)->ah_ops->ah_refresh))(auth)) - -#define AUTH_DESTROY(auth) \ - ((*((auth)->ah_ops->ah_destroy))(auth)) -#define auth_destroy(auth) \ - ((*((auth)->ah_ops->ah_destroy))(auth)) - -#define AUTH_WRAP(auth, xdrs, xfunc, xwhere) \ - ((*((auth)->ah_ops->ah_wrap))(auth, xdrs, \ - xfunc, xwhere)) -#define auth_wrap(auth, xdrs, xfunc, xwhere) \ - ((*((auth)->ah_ops->ah_wrap))(auth, xdrs, \ - xfunc, xwhere)) - -#define AUTH_UNWRAP(auth, xdrs, xfunc, xwhere) \ - ((*((auth)->ah_ops->ah_unwrap))(auth, xdrs, \ - xfunc, xwhere)) -#define auth_unwrap(auth, xdrs, xfunc, xwhere) \ - ((*((auth)->ah_ops->ah_unwrap))(auth, xdrs, \ - xfunc, xwhere)) - - -extern struct opaque_auth _null_auth; - -/* - * Any style authentication. These routines can be used by any - * authentication style that does not use the wrap/unwrap functions. - */ -int authany_wrap(), authany_unwrap(); - -/* - * These are the various implementations of client side authenticators. - */ - -/* - * Unix style authentication - * AUTH *authunix_create(machname, uid, gid, len, aup_gids) - * char *machname; - * int uid; - * int gid; - * int len; - * int *aup_gids; - */ -__BEGIN_DECLS -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 *)); -extern bool_t xdr_opaque_auth __P((XDR *, struct opaque_auth *)); -__END_DECLS - -#define AUTH_NONE 0 /* no authentication */ -#define AUTH_NULL 0 /* backward compatibility */ -#define AUTH_UNIX 1 /* unix style (uid, gids) */ -#define AUTH_SHORT 2 /* short hand unix style */ -#define AUTH_DES 3 /* des style (encrypted timestamps) */ -#define RPCSEC_GSS 6 /* RPCSEC_GSS */ - -#endif /* !_RPC_AUTH_H */ diff --git a/support/rpc/include/rpc/auth_gss.h b/support/rpc/include/rpc/auth_gss.h deleted file mode 100644 index 4258c58..0000000 --- a/support/rpc/include/rpc/auth_gss.h +++ /dev/null @@ -1,122 +0,0 @@ -/* - auth_gss.h - - Copyright (c) 2000 The Regents of the University of Michigan. - All rights reserved. - - Copyright (c) 2000 Dug Song . - All rights reserved, all wrongs reversed. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the University nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED - WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR - BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -*/ - -#ifndef _RPC_AUTH_GSS_H -#define _RPC_AUTH_GSS_H - -#include -#include - -/* RPCSEC_GSS control procedures. */ -typedef enum { - RPCSEC_GSS_DATA = 0, - RPCSEC_GSS_INIT = 1, - RPCSEC_GSS_CONTINUE_INIT = 2, - RPCSEC_GSS_DESTROY = 3 -} rpc_gss_proc_t; - -/* RPCSEC_GSS services. */ -typedef enum { - RPCSEC_GSS_SVC_NONE = 1, - RPCSEC_GSS_SVC_INTEGRITY = 2, - RPCSEC_GSS_SVC_PRIVACY = 3 -} rpc_gss_svc_t; - -#define RPCSEC_GSS_VERSION 1 - -/* RPCSEC_GSS security triple. */ -struct rpc_gss_sec { - gss_OID mech; /* mechanism */ - gss_qop_t qop; /* quality of protection */ - rpc_gss_svc_t svc; /* service */ - gss_cred_id_t cred; /* cred handle */ - u_int req_flags; /* req flags for init_sec_context */ -}; - -/* Private data required for kernel implementation */ -struct authgss_private_data { - gss_ctx_id_t pd_ctx; /* Session context handle */ - gss_buffer_desc pd_ctx_hndl; /* Credentials context handle */ - u_int pd_seq_win; /* Sequence window */ -}; - -/* Credentials. */ -struct rpc_gss_cred { - u_int gc_v; /* version */ - rpc_gss_proc_t gc_proc; /* control procedure */ - u_int gc_seq; /* sequence number */ - rpc_gss_svc_t gc_svc; /* service */ - gss_buffer_desc gc_ctx; /* context handle */ -}; - -/* Context creation response. */ -struct rpc_gss_init_res { - gss_buffer_desc gr_ctx; /* context handle */ - u_int gr_major; /* major status */ - u_int gr_minor; /* minor status */ - u_int gr_win; /* sequence window */ - gss_buffer_desc gr_token; /* token */ -}; - -/* Maximum sequence number value. */ -#define MAXSEQ 0x80000000 - -/* Prototypes. */ -__BEGIN_DECLS -bool_t xdr_rpc_gss_cred __P((XDR *xdrs, struct rpc_gss_cred *p)); -bool_t xdr_rpc_gss_init_args __P((XDR *xdrs, gss_buffer_desc *p)); -bool_t xdr_rpc_gss_init_res __P((XDR *xdrs, struct rpc_gss_init_res *p)); -bool_t xdr_rpc_gss_data __P((XDR *xdrs, xdrproc_t xdr_func, - caddr_t xdr_ptr, gss_ctx_id_t ctx, - gss_qop_t qop, rpc_gss_svc_t svc, - u_int seq)); - -AUTH *authgss_create __P((CLIENT *, gss_name_t, - struct rpc_gss_sec *)); -AUTH *authgss_create_default __P((CLIENT *, char *, struct rpc_gss_sec *)); -bool_t authgss_service __P((AUTH *auth, int svc)); -bool_t authgss_get_private_data __P((AUTH *auth, - struct authgss_private_data *)); - - -void log_debug __P((const char *fmt, ...)); -void log_status __P((char *m, OM_uint32 major, - OM_uint32 minor)); -void log_hexdump __P((const u_char *buf, int len, int offset)); - -__END_DECLS - -#endif /* !_RPC_AUTH_GSS_H */ diff --git a/support/rpc/include/rpc/auth_unix.h b/support/rpc/include/rpc/auth_unix.h deleted file mode 100644 index 06cff5d..0000000 --- a/support/rpc/include/rpc/auth_unix.h +++ /dev/null @@ -1,84 +0,0 @@ -/* $OpenBSD: auth_unix.h,v 1.2 1997/09/21 10:46:09 niklas Exp $ */ -/* $NetBSD: auth_unix.h,v 1.4 1994/10/26 00:56:56 cgd Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)auth_unix.h 1.8 88/02/08 SMI - * @(#)auth_unix.h 2.2 88/07/29 4.0 RPCSRC - */ - -/* - * auth_unix.h, Protocol for UNIX style authentication parameters for RPC - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -/* - * The system is very weak. The client uses no encryption for it - * credentials and only sends null verifiers. The server sends backs - * null verifiers or optionally a verifier that suggests a new short hand - * for the credentials. - */ - -#ifndef _RPC_AUTH_UNIX_H -#define _RPC_AUTH_UNIX_H -#include - -/* The machine name is part of a credential; it may not exceed 255 bytes */ -#define MAX_MACHINE_NAME 255 - -/* gids compose part of a credential; there may not be more than 16 of them */ -#define NGRPS 16 - -/* - * Unix style credentials. - */ -struct authunix_parms { - u_long aup_time; - char *aup_machname; - int aup_uid; - int aup_gid; - u_int aup_len; - int *aup_gids; -}; - -__BEGIN_DECLS -extern bool_t xdr_authunix_parms __P((XDR *, struct authunix_parms *)); -__END_DECLS - -/* - * If a response verifier has flavor AUTH_SHORT, - * then the body of the response verifier encapsulates the following structure; - * again it is serialized in the obvious fashion. - */ -struct short_hand_verf { - struct opaque_auth new_cred; -}; - -#endif /* !_RPC_AUTH_UNIX_H */ diff --git a/support/rpc/include/rpc/clnt.h b/support/rpc/include/rpc/clnt.h deleted file mode 100644 index 4ac7be2..0000000 --- a/support/rpc/include/rpc/clnt.h +++ /dev/null @@ -1,373 +0,0 @@ -/* $OpenBSD: clnt.h,v 1.4 1998/03/19 00:27:17 millert Exp $ */ -/* $NetBSD: clnt.h,v 1.6 1995/04/29 05:27:58 cgd Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)clnt.h 1.31 88/02/08 SMI - * @(#)clnt.h 2.1 88/07/29 4.0 RPCSRC - */ - -/* - * clnt.h - Client side remote procedure call interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_CLNT_H_ -#define _RPC_CLNT_H_ -#include - -/* - * Rpc calls return an enum clnt_stat. This should be looked at more, - * since each implementation is required to live with this (implementation - * independent) list of errors. - */ -enum clnt_stat { - RPC_SUCCESS=0, /* call succeeded */ - /* - * local errors - */ - RPC_CANTENCODEARGS=1, /* can't encode arguments */ - RPC_CANTDECODERES=2, /* can't decode results */ - RPC_CANTSEND=3, /* failure in sending call */ - RPC_CANTRECV=4, /* failure in receiving result */ - RPC_TIMEDOUT=5, /* call timed out */ - /* - * remote errors - */ - RPC_VERSMISMATCH=6, /* rpc versions not compatible */ - RPC_AUTHERROR=7, /* authentication error */ - RPC_PROGUNAVAIL=8, /* program not available */ - RPC_PROGVERSMISMATCH=9, /* program version mismatched */ - RPC_PROCUNAVAIL=10, /* procedure unavailable */ - RPC_CANTDECODEARGS=11, /* decode arguments error */ - RPC_SYSTEMERROR=12, /* generic "other problem" */ - - /* - * callrpc & clnt_create errors - */ - RPC_UNKNOWNHOST=13, /* unknown host name */ - RPC_UNKNOWNPROTO=17, /* unkown protocol */ - - /* - * _ create errors - */ - RPC_PMAPFAILURE=14, /* the pmapper failed in its call */ - RPC_PROGNOTREGISTERED=15, /* remote program is not registered */ - /* - * unspecified error - */ - RPC_FAILED=16 -}; - - -/* - * Error info. - */ -struct rpc_err { - enum clnt_stat re_status; - union { - int RE_errno; /* realated system error */ - enum auth_stat RE_why; /* why the auth error occurred */ - struct { - u_int32_t low; /* lowest verion supported */ - u_int32_t high; /* highest verion supported */ - } RE_vers; - struct { /* maybe meaningful if RPC_FAILED */ - int32_t s1; - int32_t s2; - } RE_lb; /* life boot & debugging only */ - } ru; -#define re_errno ru.RE_errno -#define re_why ru.RE_why -#define re_vers ru.RE_vers -#define re_lb ru.RE_lb -}; - - -/* - * Client rpc handle. - * Created by individual implementations, see e.g. rpc_udp.c. - * Client is responsible for initializing auth, see e.g. auth_none.c. - */ -typedef struct __rpc_client { - AUTH *cl_auth; /* authenticator */ - struct clnt_ops { - /* call remote procedure */ - enum clnt_stat (*cl_call) __P((struct __rpc_client *, - u_long, xdrproc_t, caddr_t, xdrproc_t, - caddr_t, struct timeval)); - /* abort a call */ - void (*cl_abort) __P((struct __rpc_client *)); - /* get specific error code */ - void (*cl_geterr) __P((struct __rpc_client *, - struct rpc_err *)); - /* frees results */ - bool_t (*cl_freeres) __P((struct __rpc_client *, - xdrproc_t, caddr_t)); - /* destroy this structure */ - void (*cl_destroy) __P((struct __rpc_client *)); - /* the ioctl() of rpc */ - bool_t (*cl_control) __P((struct __rpc_client *, u_int, - void *)); - } *cl_ops; - caddr_t cl_private; /* private stuff */ -} CLIENT; - - -/* - * client side rpc interface ops - * - * Parameter types are: - * - */ - -/* - * enum clnt_stat - * CLNT_CALL(rh, proc, xargs, argsp, xres, resp, timeout) - * CLIENT *rh; - * u_long proc; - * xdrproc_t xargs; - * caddr_t argsp; - * xdrproc_t xres; - * caddr_t resp; - * struct timeval timeout; - */ -#define CLNT_CALL(rh, proc, xargs, argsp, xres, resp, secs) \ - ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, (caddr_t)argsp, \ - xres, (caddr_t)resp, secs)) -#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs) \ - ((*(rh)->cl_ops->cl_call)(rh, proc, xargs, (caddr_t)argsp, \ - xres, (caddr_t)resp, secs)) - -/* - * void - * CLNT_ABORT(rh); - * CLIENT *rh; - */ -#define CLNT_ABORT(rh) ((*(rh)->cl_ops->cl_abort)(rh)) -#define clnt_abort(rh) ((*(rh)->cl_ops->cl_abort)(rh)) - -/* - * struct rpc_err - * CLNT_GETERR(rh); - * CLIENT *rh; - */ -#define CLNT_GETERR(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) -#define clnt_geterr(rh,errp) ((*(rh)->cl_ops->cl_geterr)(rh, errp)) - - -/* - * bool_t - * CLNT_FREERES(rh, xres, resp); - * CLIENT *rh; - * xdrproc_t xres; - * caddr_t resp; - */ -#define CLNT_FREERES(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp)) -#define clnt_freeres(rh,xres,resp) ((*(rh)->cl_ops->cl_freeres)(rh,xres,resp)) - -/* - * bool_t - * CLNT_CONTROL(cl, request, info) - * CLIENT *cl; - * u_int request; - * char *info; - */ -#define CLNT_CONTROL(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) -#define clnt_control(cl,rq,in) ((*(cl)->cl_ops->cl_control)(cl,rq,in)) - -/* - * control operations that apply to both udp and tcp transports - */ -#define CLSET_TIMEOUT 1 /* set timeout (timeval) */ -#define CLGET_TIMEOUT 2 /* get timeout (timeval) */ -#define CLGET_SERVER_ADDR 3 /* get server's address (sockaddr) */ -/* - * udp only control operations - */ -#define CLSET_RETRY_TIMEOUT 4 /* set retry timeout (timeval) */ -#define CLGET_RETRY_TIMEOUT 5 /* get retry timeout (timeval) */ - -/* - * void - * CLNT_DESTROY(rh); - * CLIENT *rh; - */ -#define CLNT_DESTROY(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) -#define clnt_destroy(rh) ((*(rh)->cl_ops->cl_destroy)(rh)) - - -/* - * RPCTEST is a test program which is accessable on every rpc - * transport/port. It is used for testing, performance evaluation, - * and network administration. - */ - -#define RPCTEST_PROGRAM ((u_long)1) -#define RPCTEST_VERSION ((u_long)1) -#define RPCTEST_NULL_PROC ((u_long)2) -#define RPCTEST_NULL_BATCH_PROC ((u_long)3) - -/* - * By convention, procedure 0 takes null arguments and returns them - */ - -#define NULLPROC ((u_int)0) - -/* - * Below are the client handle creation routines for the various - * implementations of client side rpc. They can return NULL if a - * creation failure occurs. - */ - -/* - * Memory based rpc (for speed check and testing) - * CLIENT * - * clntraw_create(prog, vers) - * u_long prog; - * u_long vers; - */ -__BEGIN_DECLS -extern CLIENT *clntraw_create __P((u_long, u_long)); -__END_DECLS - - -/* - * Generic client creation routine. Supported protocols are "udp" and "tcp" - * CLIENT * - * clnt_create(host, prog, vers, prot); - * char *host; -- hostname - * u_long prog; -- program number - * u_long vers; -- version number - * char *prot; -- protocol - */ -__BEGIN_DECLS -extern CLIENT *clnt_create __P((char *, u_long, u_long, char *)); -__END_DECLS - - -/* - * TCP based rpc - * CLIENT * - * clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz) - * struct sockaddr_in *raddr; - * u_long prog; - * u_long version; - * register int *sockp; - * u_int sendsz; - * u_int recvsz; - */ -__BEGIN_DECLS -extern CLIENT *clnttcp_create __P((struct sockaddr_in *, - u_long, - u_long, - int *, - u_int, - u_int)); -__END_DECLS - - -/* - * UDP based rpc. - * CLIENT * - * clntudp_create(raddr, program, version, wait, sockp) - * struct sockaddr_in *raddr; - * u_long program; - * u_long version; - * struct timeval wait; - * int *sockp; - * - * Same as above, but you specify max packet sizes. - * CLIENT * - * clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz) - * struct sockaddr_in *raddr; - * u_long program; - * u_long version; - * struct timeval wait; - * int *sockp; - * u_int sendsz; - * u_int recvsz; - */ -__BEGIN_DECLS -extern CLIENT *clntudp_create __P((struct sockaddr_in *, - u_long, - u_long, - struct timeval, - int *)); -extern CLIENT *clntudp_bufcreate __P((struct sockaddr_in *, - u_long, - u_long, - struct timeval, - int *, - u_int, - u_int)); -__END_DECLS - - -/* - * Print why creation failed - */ -__BEGIN_DECLS -extern void clnt_pcreateerror __P((char *)); /* stderr */ -extern char *clnt_spcreateerror __P((char *)); /* string */ -__END_DECLS - -/* - * Like clnt_perror(), but is more verbose in its output - */ -__BEGIN_DECLS -extern void clnt_perrno __P((enum clnt_stat)); /* stderr */ -extern char *clnt_sperrno __P((enum clnt_stat)); /* string */ -__END_DECLS - -/* - * Print an English error message, given the client error code - */ -__BEGIN_DECLS -extern void clnt_perror __P((CLIENT *, char *)); /* stderr */ -extern char *clnt_sperror __P((CLIENT *, char *)); /* string */ -__END_DECLS - - -/* - * If a creation fails, the following allows the user to figure out why. - */ -struct rpc_createerr { - enum clnt_stat cf_stat; - struct rpc_err cf_error; /* useful when cf_stat == RPC_PMAPFAILURE */ -}; - -extern struct rpc_createerr rpc_createerr; - - -#define UDPMSGSIZE 8800 /* rpc imposed limit on udp msg size */ -#define RPCSMALLMSGSIZE 400 /* a more reasonable packet size */ - -#endif /* !_RPC_CLNT_H */ diff --git a/support/rpc/include/rpc/pmap_clnt.h b/support/rpc/include/rpc/pmap_clnt.h deleted file mode 100644 index f7aff55..0000000 --- a/support/rpc/include/rpc/pmap_clnt.h +++ /dev/null @@ -1,87 +0,0 @@ -/* $OpenBSD: pmap_clnt.h,v 1.3 1998/08/29 18:57:14 deraadt Exp $ */ -/* $NetBSD: pmap_clnt.h,v 1.5 1994/12/04 01:12:42 cgd Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)pmap_clnt.h 1.11 88/02/08 SMI - * @(#)pmap_clnt.h 2.1 88/07/29 4.0 RPCSRC - */ - -/* - * pmap_clnt.h - * Supplies C routines to get to portmap services. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -/* - * Usage: - * success = pmap_set(program, version, protocol, port); - * success = pmap_unset(program, version); - * port = pmap_getport(address, program, version, protocol); - * head = pmap_getmaps(address); - * clnt_stat = pmap_rmtcall(address, program, version, procedure, - * xdrargs, argsp, xdrres, resp, tout, port_ptr) - * (works for udp only.) - * clnt_stat = clnt_broadcast(program, version, procedure, - * xdrargs, argsp, xdrres, resp, eachresult) - * (like pmap_rmtcall, except the call is broadcasted to all - * locally connected nets. For each valid response received, - * the procedure eachresult is called. Its form is: - * done = eachresult(resp, raddr) - * bool_t done; - * caddr_t resp; - * struct sockaddr_in raddr; - * where resp points to the results of the call and raddr is the - * address if the responder to the broadcast. - */ - -#ifndef _RPC_PMAPCLNT_H -#define _RPC_PMAPCLNT_H -#include - -__BEGIN_DECLS -extern bool_t pmap_set __P((u_long, u_long, u_int, int)); -extern bool_t pmap_unset __P((u_long, u_long)); -extern struct pmaplist *pmap_getmaps __P((struct sockaddr_in *)); -extern enum clnt_stat pmap_rmtcall __P((struct sockaddr_in *, - u_long, u_long, u_long, - xdrproc_t, caddr_t, - xdrproc_t, caddr_t, - struct timeval, u_long *)); -extern enum clnt_stat clnt_broadcast __P((u_long, u_long, u_long, - xdrproc_t, char *, - xdrproc_t, char *, - bool_t (*) __P((caddr_t, - struct sockaddr_in *)))); -extern u_short pmap_getport __P((struct sockaddr_in *, - u_long, u_long, u_int)); -__END_DECLS - -#endif /* !_RPC_PMAPCLNT_H */ diff --git a/support/rpc/include/rpc/pmap_prot.h b/support/rpc/include/rpc/pmap_prot.h deleted file mode 100644 index 68f5474..0000000 --- a/support/rpc/include/rpc/pmap_prot.h +++ /dev/null @@ -1,106 +0,0 @@ -/* $OpenBSD: pmap_prot.h,v 1.3 1998/02/10 06:25:32 deraadt Exp $ */ -/* $NetBSD: pmap_prot.h,v 1.4 1994/10/26 00:57:00 cgd Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)pmap_prot.h 1.14 88/02/08 SMI - * @(#)pmap_prot.h 2.1 88/07/29 4.0 RPCSRC - */ - -/* - * pmap_prot.h - * Protocol for the local binder service, or pmap. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - * - * The following procedures are supported by the protocol: - * - * PMAPPROC_NULL() returns () - * takes nothing, returns nothing - * - * PMAPPROC_SET(struct pmap) returns (bool_t) - * TRUE is success, FALSE is failure. Registers the tuple - * [prog, vers, prot, port]. - * - * PMAPPROC_UNSET(struct pmap) returns (bool_t) - * TRUE is success, FALSE is failure. Un-registers pair - * [prog, vers]. prot and port are ignored. - * - * PMAPPROC_GETPORT(struct pmap) returns (unsigned long). - * 0 is failure. Otherwise returns the port number where the pair - * [prog, vers] is registered. It may lie! - * - * PMAPPROC_DUMP() RETURNS (struct pmaplist *) - * - * PMAPPROC_CALLIT(unsigned int, unsigned int, unsigned int, string<>) - * RETURNS (port, string<>); - * usage: encapsulatedresults = PMAPPROC_CALLIT(prog, vers, proc, encapsulatedargs); - * Calls the procedure on the local machine. If it is not registered, - * this procedure is quite; ie it does not return error information!!! - * This procedure only is supported on rpc/udp and calls via - * rpc/udp. This routine only passes null authentication parameters. - * This file has no interface to xdr routines for PMAPPROC_CALLIT. - * - * The service supports remote procedure calls on udp/ip or tcp/ip socket 111. - */ - -#ifndef _RPC_PMAPPROT_H -#define _RPC_PMAPPROT_H -#include - -#define PMAPPORT ((u_short)111) -#define PMAPPROG ((u_long)100000) -#define PMAPVERS ((u_long)2) -#define PMAPVERS_PROTO ((u_long)2) -#define PMAPVERS_ORIG ((u_long)1) -#define PMAPPROC_NULL ((u_long)0) -#define PMAPPROC_SET ((u_long)1) -#define PMAPPROC_UNSET ((u_long)2) -#define PMAPPROC_GETPORT ((u_long)3) -#define PMAPPROC_DUMP ((u_long)4) -#define PMAPPROC_CALLIT ((u_long)5) - -struct pmap { - unsigned long pm_prog; - unsigned long pm_vers; - unsigned long pm_prot; - unsigned long pm_port; -}; - -struct pmaplist { - struct pmap pml_map; - struct pmaplist *pml_next; -}; - -__BEGIN_DECLS -extern bool_t xdr_pmap __P((XDR *, struct pmap *)); -extern bool_t xdr_pmaplist __P((XDR *, struct pmaplist **)); -__END_DECLS - -#endif /* !_RPC_PMAPPROT_H */ diff --git a/support/rpc/include/rpc/pmap_rmt.h b/support/rpc/include/rpc/pmap_rmt.h deleted file mode 100644 index 203813f..0000000 --- a/support/rpc/include/rpc/pmap_rmt.h +++ /dev/null @@ -1,65 +0,0 @@ -/* $OpenBSD: pmap_rmt.h,v 1.2 1997/09/21 10:46:13 niklas Exp $ */ -/* $NetBSD: pmap_rmt.h,v 1.4 1994/10/26 00:57:01 cgd Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)pmap_rmt.h 1.2 88/02/08 SMI - * @(#)pmap_rmt.h 2.1 88/07/29 4.0 RPCSRC - */ - -/* - * Structures and XDR routines for parameters to and replies from - * the portmapper remote-call-service. - * - * Copyright (C) 1986, Sun Microsystems, Inc. - */ - -#ifndef _RPC_PMAPRMT_H -#define _RPC_PMAPRMT_H -#include - -struct rmtcallargs { - u_long prog, vers, proc, arglen; - caddr_t args_ptr; - xdrproc_t xdr_args; -}; - -struct rmtcallres { - u_long *port_ptr; - u_long resultslen; - caddr_t results_ptr; - xdrproc_t xdr_results; -}; - -__BEGIN_DECLS -extern bool_t xdr_rmtcall_args __P((XDR *, struct rmtcallargs *)); -extern bool_t xdr_rmtcallres __P((XDR *, struct rmtcallres *)); -__END_DECLS - -#endif /* !_RPC_PMAPRMT_H */ diff --git a/support/rpc/include/rpc/rpc.h b/support/rpc/include/rpc/rpc.h deleted file mode 100644 index 5b62519..0000000 --- a/support/rpc/include/rpc/rpc.h +++ /dev/null @@ -1,109 +0,0 @@ -/* $OpenBSD: rpc.h,v 1.7 1998/12/20 23:43:18 millert Exp $ */ -/* $NetBSD: rpc.h,v 1.5 1994/12/04 01:15:30 cgd Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)rpc.h 1.9 88/02/08 SMI - * @(#)rpc.h 2.4 89/07/11 4.0 RPCSRC - */ - -/* - * rpc.h, Just includes the billions of rpc header files necessary to - * do remote procedure calling. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ -#ifndef _RPC_RPC_H -#define _RPC_RPC_H - -#include /* some typedefs */ -#include - -/* external data representation interfaces */ -#include /* generic (de)serializer */ - -/* Client side only authentication */ -#include /* generic authenticator (client side) */ - -/* Client side (mostly) remote procedure call */ -#include /* generic rpc stuff */ - -/* Client side (mostly) pmap functions */ -#include /* generic pmap stuff */ - -/* semi-private protocol headers */ -#include /* protocol for rpc messages */ -#include /* protocol for unix style cred */ -#include "auth_gss.h" /* RPCSEC_GSS */ - -/* - * Uncomment-out the next line if you are building the rpc library with - * DES Authentication (see the README file in the secure_rpc/ directory). - */ -#ifdef notdef -#include /* protocol for des style cred */ -#endif - -/* Server side only remote procedure callee */ -#include /* service side authenticator */ -#include /* service manager and multiplexer */ - -/* - * COMMENT OUT THE NEXT INCLUDE (or add to the #ifndef) IF RUNNING ON - * A VERSION OF UNIX THAT USES SUN'S NFS SOURCE. These systems will - * already have the structures defined by included in . - */ -/* routines for parsing /etc/rpc */ -#ifdef __linux__ -#include -#else -struct rpcent { - char *r_name; /* name of server for this rpc program */ - char **r_aliases; /* alias list */ - int r_number; /* rpc program number */ -}; - -__BEGIN_DECLS -extern struct rpcent *getrpcbyname __P((char *)); -extern struct rpcent *getrpcbynumber __P((int)); -extern struct rpcent *getrpcent __P((void)); -extern void setrpcent __P((int)); -extern void endrpcent __P((void)); - -extern int get_myaddress __P((struct sockaddr_in *)); -extern int registerrpc __P((int, int, int, char *(*) __P((char [UDPMSGSIZE])), - xdrproc_t, xdrproc_t)); -extern int callrpc __P((char *, int, int, int, xdrproc_t, char *, - xdrproc_t , char *)); -extern int getrpcport __P((char *, int, int, int)); - -__END_DECLS -#endif /* __linux__ */ - -#endif /* !_RPC_RPC_H */ diff --git a/support/rpc/include/rpc/rpc_des.h b/support/rpc/include/rpc/rpc_des.h deleted file mode 100644 index 597a473..0000000 --- a/support/rpc/include/rpc/rpc_des.h +++ /dev/null @@ -1,133 +0,0 @@ -/* $OpenBSD: rpc_des.h,v 1.3 1998/02/10 06:25:33 deraadt Exp $ */ - -/* crypto/des/rpc_des.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au) - * All rights reserved. - * - * This package is an SSL implementation written - * by Eric Young (eay@mincom.oz.au). - * The implementation was written so as to conform with Netscapes SSL. - * - * This library is free for commercial and non-commercial use as long as - * the following conditions are aheared to. The following conditions - * apply to all code found in this distribution, be it the RC4, RSA, - * lhash, DES, etc., code; not just the SSL code. The SSL documentation - * included with this distribution is covered by the same copyright terms - * except that the holder is Tim Hudson (tjh@mincom.oz.au). - * - * Copyright remains Eric Young's, and as such any Copyright notices in - * the code are not to be removed. - * If this package is used in a product, Eric Young should be given attribution - * as the author of the parts of the library used. - * This can be in the form of a textual message at program startup or - * in documentation (online or textual) provided with the package. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * "This product includes cryptographic software written by - * Eric Young (eay@mincom.oz.au)" - * The word 'cryptographic' can be left out if the rouines from the library - * being used are not cryptographic related :-). - * 4. If you include any Windows specific code (or a derivative thereof) from - * the apps directory (application code) you must include an acknowledgement: - * "This product includes software written by Tim Hudson (tjh@mincom.oz.au)" - * - * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * The licence and distribution terms for any publically available version or - * derivative of this code cannot be changed. i.e. this code cannot simply be - * copied and put under another distribution licence - * [including the GNU Public Licence.] - */ - -/* @(#)des.h 2.2 88/08/10 4.0 RPCSRC; from 2.7 88/02/08 SMI */ -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - */ -/* - * Generic DES driver interface - * Keep this file hardware independent! - * Copyright (c) 1986 by Sun Microsystems, Inc. - */ - -#define DES_MAXLEN 65536 /* maximum # of bytes to encrypt */ -#define DES_QUICKLEN 16 /* maximum # of bytes to encrypt quickly */ - -#ifdef HEADER_DES_H -#undef ENCRYPT -#undef DECRYPT -#endif - -enum desdir { ENCRYPT, DECRYPT }; -enum desmode { CBC, ECB }; - -/* - * parameters to ioctl call - */ -struct desparams { - unsigned char des_key[8]; /* key (with low bit parity) */ - enum desdir des_dir; /* direction */ - enum desmode des_mode; /* mode */ - unsigned char des_ivec[8]; /* input vector */ - unsigned int des_len; /* number of bytes to crypt */ - union { - unsigned char UDES_data[DES_QUICKLEN]; - unsigned char *UDES_buf; - } UDES; -# define des_data UDES.UDES_data /* direct data here if quick */ -# define des_buf UDES.UDES_buf /* otherwise, pointer to data */ -}; - -/* - * Encrypt an arbitrary sized buffer - */ -#define DESIOCBLOCK _IOWR(d, 6, struct desparams) - -/* - * Encrypt of small amount of data, quickly - */ -#define DESIOCQUICK _IOWR(d, 7, struct desparams) - diff --git a/support/rpc/include/rpc/rpc_msg.h b/support/rpc/include/rpc/rpc_msg.h deleted file mode 100644 index 63432d1..0000000 --- a/support/rpc/include/rpc/rpc_msg.h +++ /dev/null @@ -1,197 +0,0 @@ -/* $OpenBSD: rpc_msg.h,v 1.2 1997/09/21 10:46:15 niklas Exp $ */ -/* $NetBSD: rpc_msg.h,v 1.5 1995/04/29 05:28:00 cgd Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)rpc_msg.h 1.7 86/07/16 SMI - * @(#)rpc_msg.h 2.1 88/07/29 4.0 RPCSRC - */ - -/* - * rpc_msg.h - * rpc message definition - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_RPCMSG_H -#define _RPC_RPCMSG_H - -#define RPC_MSG_VERSION ((u_long) 2) -#define RPC_SERVICE_PORT ((u_short) 2048) - -/* - * Bottom up definition of an rpc message. - * NOTE: call and reply use the same overall stuct but - * different parts of unions within it. - */ - -enum msg_type { - CALL=0, - REPLY=1 -}; - -enum reply_stat { - MSG_ACCEPTED=0, - MSG_DENIED=1 -}; - -enum accept_stat { - SUCCESS=0, - PROG_UNAVAIL=1, - PROG_MISMATCH=2, - PROC_UNAVAIL=3, - GARBAGE_ARGS=4, - SYSTEM_ERR=5 -}; - -enum reject_stat { - RPC_MISMATCH=0, - AUTH_ERROR=1 -}; - -/* - * Reply part of an rpc exchange - */ - -/* - * Reply to an rpc request that was accepted by the server. - * Note: there could be an error even though the request was - * accepted. - */ -struct accepted_reply { - struct opaque_auth ar_verf; - enum accept_stat ar_stat; - union { - struct { - u_int32_t low; - u_int32_t high; - } AR_versions; - struct { - caddr_t where; - xdrproc_t proc; - } AR_results; - /* and many other null cases */ - } ru; -#define ar_results ru.AR_results -#define ar_vers ru.AR_versions -}; - -/* - * Reply to an rpc request that was rejected by the server. - */ -struct rejected_reply { - enum reject_stat rj_stat; - union { - struct { - u_int32_t low; - u_int32_t high; - } RJ_versions; - enum auth_stat RJ_why; /* why authentication did not work */ - } ru; -#define rj_vers ru.RJ_versions -#define rj_why ru.RJ_why -}; - -/* - * Body of a reply to an rpc request. - */ -struct reply_body { - enum reply_stat rp_stat; - union { - struct accepted_reply RP_ar; - struct rejected_reply RP_dr; - } ru; -#define rp_acpt ru.RP_ar -#define rp_rjct ru.RP_dr -}; - -/* - * Body of an rpc request call. - */ -struct call_body { - u_int32_t cb_rpcvers; /* must be equal to two */ - u_int32_t cb_prog; - u_int32_t cb_vers; - u_int32_t cb_proc; - struct opaque_auth cb_cred; - struct opaque_auth cb_verf; /* protocol specific - provided by client */ -}; - -/* - * The rpc message - */ -struct rpc_msg { - u_int32_t rm_xid; - enum msg_type rm_direction; - union { - struct call_body RM_cmb; - struct reply_body RM_rmb; - } ru; -#define rm_call ru.RM_cmb -#define rm_reply ru.RM_rmb -}; -#define acpted_rply ru.RM_rmb.ru.RP_ar -#define rjcted_rply ru.RM_rmb.ru.RP_dr - -__BEGIN_DECLS -/* - * XDR routine to handle a rpc message. - * xdr_callmsg(xdrs, cmsg) - * XDR *xdrs; - * struct rpc_msg *cmsg; - */ -extern bool_t xdr_callmsg __P((XDR *, struct rpc_msg *)); - -/* - * XDR routine to pre-serialize the static part of a rpc message. - * xdr_callhdr(xdrs, cmsg) - * XDR *xdrs; - * struct rpc_msg *cmsg; - */ -extern bool_t xdr_callhdr __P((XDR *, struct rpc_msg *)); - -/* - * XDR routine to handle a rpc reply. - * xdr_replymsg(xdrs, rmsg) - * XDR *xdrs; - * struct rpc_msg *rmsg; - */ -extern bool_t xdr_replymsg __P((XDR *, struct rpc_msg *)); - -/* - * Fills in the error part of a reply message. - * _seterr_reply(msg, error) - * struct rpc_msg *msg; - * struct rpc_err *error; - */ -extern void _seterr_reply __P((struct rpc_msg *, struct rpc_err *)); -__END_DECLS - -#endif /* !_RPC_RPCMSG_H */ diff --git a/support/rpc/include/rpc/svc.h b/support/rpc/include/rpc/svc.h deleted file mode 100644 index 5c7c900..0000000 --- a/support/rpc/include/rpc/svc.h +++ /dev/null @@ -1,334 +0,0 @@ -/* $OpenBSD: svc.h,v 1.2 1997/09/21 10:46:16 niklas Exp $ */ -/* $NetBSD: svc.h,v 1.9 1995/04/29 05:28:01 cgd Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)svc.h 1.20 88/02/08 SMI - * @(#)svc.h 2.2 88/07/29 4.0 RPCSRC - */ - -/* - * svc.h, Server-side remote procedure call interface. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_SVC_H -#define _RPC_SVC_H -#include - -/* - * This interface must manage two items concerning remote procedure calling: - * - * 1) An arbitrary number of transport connections upon which rpc requests - * are received. The two most notable transports are TCP and UDP; they are - * created and registered by routines in svc_tcp.c and svc_udp.c, respectively; - * they in turn call xprt_register and xprt_unregister. - * - * 2) An arbitrary number of locally registered services. Services are - * described by the following four data: program number, version number, - * "service dispatch" function, a transport handle, and a boolean that - * indicates whether or not the exported program should be registered with a - * local binder service; if true the program's number and version and the - * port number from the transport handle are registered with the binder. - * These data are registered with the rpc svc system via svc_register. - * - * A service's dispatch function is called whenever an rpc request comes in - * on a transport. The request's program and version numbers must match - * those of the registered service. The dispatch function is passed two - * parameters, struct svc_req * and SVCXPRT *, defined below. - */ - -enum xprt_stat { - XPRT_DIED, - XPRT_MOREREQS, - XPRT_IDLE -}; - -/* - * Server side transport handle - */ -typedef struct __rpc_svcxprt { - int xp_sock; - u_short xp_port; /* associated port number */ - struct xp_ops { - /* receive incomming requests */ - bool_t (*xp_recv) __P((struct __rpc_svcxprt *, - struct rpc_msg *)); - /* get transport status */ - enum xprt_stat (*xp_stat) __P((struct __rpc_svcxprt *)); - /* get arguments */ - bool_t (*xp_getargs) __P((struct __rpc_svcxprt *, xdrproc_t, - caddr_t)); - /* send reply */ - bool_t (*xp_reply) __P((struct __rpc_svcxprt *, - struct rpc_msg *)); - /* free mem allocated for args */ - bool_t (*xp_freeargs) __P((struct __rpc_svcxprt *, xdrproc_t, - caddr_t)); - /* destroy this struct */ - void (*xp_destroy) __P((struct __rpc_svcxprt *)); - } *xp_ops; - int xp_addrlen; /* length of remote address */ - struct sockaddr_in xp_raddr; /* remote address */ - struct opaque_auth xp_verf; /* raw response verifier */ - SVCAUTH *xp_auth; /* auth handle of current req */ - caddr_t xp_p1; /* private */ - caddr_t xp_p2; /* private */ -} SVCXPRT; - -/* - * Approved way of getting address of caller - */ -#define svc_getcaller(x) (&(x)->xp_raddr) - -/* - * Operations defined on an SVCXPRT handle - * - * SVCXPRT *xprt; - * struct rpc_msg *msg; - * xdrproc_t xargs; - * caddr_t argsp; - */ -#define SVC_RECV(xprt, msg) \ - (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) -#define svc_recv(xprt, msg) \ - (*(xprt)->xp_ops->xp_recv)((xprt), (msg)) - -#define SVC_STAT(xprt) \ - (*(xprt)->xp_ops->xp_stat)(xprt) -#define svc_stat(xprt) \ - (*(xprt)->xp_ops->xp_stat)(xprt) - -#define SVC_GETARGS(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp)) -#define svc_getargs(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_getargs)((xprt), (xargs), (argsp)) - -#define SVC_REPLY(xprt, msg) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) -#define svc_reply(xprt, msg) \ - (*(xprt)->xp_ops->xp_reply) ((xprt), (msg)) - -#define SVC_FREEARGS(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp)) -#define svc_freeargs(xprt, xargs, argsp) \ - (*(xprt)->xp_ops->xp_freeargs)((xprt), (xargs), (argsp)) - -#define SVC_DESTROY(xprt) \ - (*(xprt)->xp_ops->xp_destroy)(xprt) -#define svc_destroy(xprt) \ - (*(xprt)->xp_ops->xp_destroy)(xprt) - - -/* - * Service request - */ -struct svc_req { - u_int32_t rq_prog; /* service program number */ - u_int32_t rq_vers; /* service protocol version */ - u_int32_t rq_proc; /* the desired procedure */ - struct opaque_auth rq_cred; /* raw creds from the wire */ - caddr_t rq_clntcred; /* read only cooked cred */ - caddr_t rq_clntname; /* read only client name */ - caddr_t rq_svcname; /* read only cooked service cred */ - SVCXPRT *rq_xprt; /* associated transport */ - - /* The request's auth flavor *should* be here, but the svc_req */ - /* isn't passed around everywhere it is necessary. The */ - /* transport *is* passed around, so the auth flavor it stored */ - /* there. This means that the transport must be single */ - /* threaded, but other parts of SunRPC already require that. */ - /*SVCAUTH *rq_auth; associated auth flavor */ -}; - - -/* - * Service registration - * - * svc_register(xprt, prog, vers, dispatch, protocol) - * SVCXPRT *xprt; - * u_long prog; - * u_long vers; - * void (*dispatch)(); - * int protocol; like TCP or UDP, zero means do not register - */ -__BEGIN_DECLS -extern bool_t svc_register __P((SVCXPRT *, u_long, u_long, - void (*) __P((struct svc_req *, SVCXPRT *)), int)); -__END_DECLS - -/* - * Service un-registration - * - * svc_unregister(prog, vers) - * u_long prog; - * u_long vers; - */ -__BEGIN_DECLS -extern void svc_unregister __P((u_long, u_long)); -__END_DECLS - -/* - * Transport registration. - * - * xprt_register(xprt) - * SVCXPRT *xprt; - */ -__BEGIN_DECLS -extern void xprt_register __P((SVCXPRT *)); -__END_DECLS - -/* - * Transport un-register - * - * xprt_unregister(xprt) - * SVCXPRT *xprt; - */ -__BEGIN_DECLS -extern void xprt_unregister __P((SVCXPRT *)); -__END_DECLS - - - - -/* - * When the service routine is called, it must first check to see if it - * knows about the procedure; if not, it should call svcerr_noproc - * and return. If so, it should deserialize its arguments via - * SVC_GETARGS (defined above). If the deserialization does not work, - * svcerr_decode should be called followed by a return. Successful - * decoding of the arguments should be followed the execution of the - * procedure's code and a call to svc_sendreply. - * - * Also, if the service refuses to execute the procedure due to too- - * weak authentication parameters, svcerr_weakauth should be called. - * Note: do not confuse access-control failure with weak authentication! - * - * NB: In pure implementations of rpc, the caller always waits for a reply - * msg. This message is sent when svc_sendreply is called. - * Therefore pure service implementations should always call - * svc_sendreply even if the function logically returns void; use - * xdr.h - xdr_void for the xdr routine. HOWEVER, tcp based rpc allows - * for the abuse of pure rpc via batched calling or pipelining. In the - * case of a batched call, svc_sendreply should NOT be called since - * this would send a return message, which is what batching tries to avoid. - * It is the service/protocol writer's responsibility to know which calls are - * batched and which are not. Warning: responding to batch calls may - * deadlock the caller and server processes! - */ - -__BEGIN_DECLS -extern bool_t svc_sendreply __P((SVCXPRT *, xdrproc_t, char *)); -extern void svcerr_decode __P((SVCXPRT *)); -extern void svcerr_weakauth __P((SVCXPRT *)); -extern void svcerr_noproc __P((SVCXPRT *)); -extern void svcerr_progvers __P((SVCXPRT *, u_long, u_long)); -extern void svcerr_auth __P((SVCXPRT *, enum auth_stat)); -extern void svcerr_noprog __P((SVCXPRT *)); -extern void svcerr_systemerr __P((SVCXPRT *)); -__END_DECLS - -/* - * Lowest level dispatching -OR- who owns this process anyway. - * Somebody has to wait for incoming requests and then call the correct - * service routine. The routine svc_run does infinite waiting; i.e., - * svc_run never returns. - * Since another (co-existant) package may wish to selectively wait for - * incoming calls or other events outside of the rpc architecture, the - * routine svc_getreq is provided. It must be passed readfds, the - * "in-place" results of a select system call (see select, section 2). - */ - -/* - * Global keeper of rpc service descriptors in use - * dynamic; must be inspected before each call to select - */ -extern int svc_maxfd; -#ifdef FD_SETSIZE -extern fd_set svc_fdset; -#define svc_fds svc_fdset.fds_bits[0] /* compatibility */ -#else -extern int svc_fds; -#endif /* def FD_SETSIZE */ - -/* - * a small program implemented by the svc_rpc implementation itself; - * also see clnt.h for protocol numbers. - */ -extern void rpctest_service(); /* XXX relic? */ - -__BEGIN_DECLS -extern void svc_getreq __P((int)); -extern void svc_getreqset __P((fd_set *)); -extern void svc_getreqset2 __P((fd_set *, int)); -extern void svc_run __P((void)); -__END_DECLS - -/* - * Socket to use on svcxxx_create call to get default socket - */ -#define RPC_ANYSOCK -1 - -/* - * These are the existing service side transport implementations - */ - -/* - * Memory based rpc for testing and timing. - */ -__BEGIN_DECLS -extern SVCXPRT *svcraw_create __P((void)); -__END_DECLS - - -/* - * Udp based rpc. - */ -__BEGIN_DECLS -extern SVCXPRT *svcudp_create __P((int)); -extern SVCXPRT *svcudp_bufcreate __P((int, u_int, u_int)); -__END_DECLS - - -/* - * Tcp based rpc. - */ -__BEGIN_DECLS -extern SVCXPRT *svctcp_create __P((int, u_int, u_int)); -__END_DECLS - -/* - * Fd based rpc. - */ -__BEGIN_DECLS -extern SVCXPRT *svcfd_create __P((int, u_int, u_int)); -__END_DECLS - -#endif /* !_RPC_SVC_H */ diff --git a/support/rpc/include/rpc/svc_auth.h b/support/rpc/include/rpc/svc_auth.h deleted file mode 100644 index 2a1b0cc..0000000 --- a/support/rpc/include/rpc/svc_auth.h +++ /dev/null @@ -1,81 +0,0 @@ -/* $OpenBSD: svc_auth.h,v 1.2 1997/09/21 10:46:16 niklas Exp $ */ -/* $NetBSD: svc_auth.h,v 1.4 1994/10/26 00:57:07 cgd Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)svc_auth.h 1.6 86/07/16 SMI - * @(#)svc_auth.h 2.1 88/07/29 4.0 RPCSRC - */ - -/* - * svc_auth.h, Service side of rpc authentication. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_SVCAUTH_H -#define _RPC_SVCAUTH_H - -/* - * Interface to server-side authentication flavors. - */ -typedef struct { - struct svc_auth_ops { - int (*svc_ah_wrap)(); - int (*svc_ah_unwrap)(); - int (*svc_ah_destroy)(); - } *svc_ah_ops; - caddr_t svc_ah_private; -} SVCAUTH; - -#define SVCAUTH_WRAP(auth, xdrs, xfunc, xwhere) \ - ((*((auth)->svc_ah_ops->svc_ah_wrap))(auth, xdrs, xfunc, xwhere)) -#define SVCAUTH_UNWRAP(auth, xdrs, xfunc, xwhere) \ - ((*((auth)->svc_ah_ops->svc_ah_unwrap))(auth, xdrs, xfunc, xwhere)) -#define SVCAUTH_DESTROY(auth) \ - ((*((auth)->svc_ah_ops->svc_ah_destroy))(auth)) - -/* - * Approved way of getting principal of caller - */ -char *svcauth_gss_get_principal __P((SVCAUTH *auth)); - -/* - * Approved way of setting server principal - */ -bool_t svcauth_gss_set_svc_name __P((gss_name_t name)); - -/* - * Server side authenticator - */ -__BEGIN_DECLS -extern enum auth_stat _authenticate(); -__END_DECLS - -#endif /* !_RPC_SVCAUTH_H */ diff --git a/support/rpc/include/rpc/types.h b/support/rpc/include/rpc/types.h deleted file mode 100644 index 21f17d8..0000000 --- a/support/rpc/include/rpc/types.h +++ /dev/null @@ -1,66 +0,0 @@ -/* $OpenBSD: types.h,v 1.2 1997/09/21 10:46:17 niklas Exp $ */ -/* $NetBSD: types.h,v 1.8 1995/04/29 05:28:05 cgd Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)types.h 1.18 87/07/24 SMI - * @(#)types.h 2.3 88/08/15 4.0 RPCSRC - */ - -/* - * Rpc additions to - */ -#ifndef _RPC_TYPES_H -#define _RPC_TYPES_H - -#define bool_t int32_t -#define enum_t int32_t -#define __dontcare__ -1 - -#ifndef FALSE -# define FALSE (0) -#endif -#ifndef TRUE -# define TRUE (1) -#endif -#ifndef NULL -# define NULL 0 -#endif - -#define mem_alloc(bsize) malloc(bsize) -#define mem_free(ptr, bsize) free(ptr) - -#ifndef makedev /* ie, we haven't already included it */ -#include -#endif -#include -#include -#include - -#endif /* !_RPC_TYPES_H */ diff --git a/support/rpc/include/rpc/xdr.h b/support/rpc/include/rpc/xdr.h deleted file mode 100644 index d293ea1..0000000 --- a/support/rpc/include/rpc/xdr.h +++ /dev/null @@ -1,310 +0,0 @@ -/* $OpenBSD: xdr.h,v 1.2 1997/09/21 10:46:18 niklas Exp $ */ -/* $NetBSD: xdr.h,v 1.7 1995/04/29 05:28:06 cgd Exp $ */ - -/* - * Sun RPC is a product of Sun Microsystems, Inc. and is provided for - * unrestricted use provided that this legend is included on all tape - * media and as a part of the software program in whole or part. Users - * may copy or modify Sun RPC without charge, but are not authorized - * to license or distribute it to anyone else except as part of a product or - * program developed by the user. - * - * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE - * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR - * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. - * - * Sun RPC is provided with no support and without any obligation on the - * part of Sun Microsystems, Inc. to assist in its use, correction, - * modification or enhancement. - * - * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE - * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC - * OR ANY PART THEREOF. - * - * In no event will Sun Microsystems, Inc. be liable for any lost revenue - * or profits or other special, indirect and consequential damages, even if - * Sun has been advised of the possibility of such damages. - * - * Sun Microsystems, Inc. - * 2550 Garcia Avenue - * Mountain View, California 94043 - * - * from: @(#)xdr.h 1.19 87/04/22 SMI - * @(#)xdr.h 2.2 88/07/29 4.0 RPCSRC - */ - -/* - * xdr.h, External Data Representation Serialization Routines. - * - * Copyright (C) 1984, Sun Microsystems, Inc. - */ - -#ifndef _RPC_XDR_H -#define _RPC_XDR_H -#include -#include - -/* - * XDR provides a conventional way for converting between C data - * types and an external bit-string representation. Library supplied - * routines provide for the conversion on built-in C data types. These - * routines and utility routines defined here are used to help implement - * a type encode/decode routine for each user-defined type. - * - * Each data type provides a single procedure which takes two arguments: - * - * bool_t - * xdrproc(xdrs, argresp) - * XDR *xdrs; - * *argresp; - * - * xdrs is an instance of a XDR handle, to which or from which the data - * type is to be converted. argresp is a pointer to the structure to be - * converted. The XDR handle contains an operation field which indicates - * which of the operations (ENCODE, DECODE * or FREE) is to be performed. - * - * XDR_DECODE may allocate space if the pointer argresp is null. This - * data can be freed with the XDR_FREE operation. - * - * We write only one procedure per data type to make it easy - * to keep the encode and decode procedures for a data type consistent. - * In many cases the same code performs all operations on a user defined type, - * because all the hard work is done in the component type routines. - * decode as a series of calls on the nested data types. - */ - -/* - * Xdr operations. XDR_ENCODE causes the type to be encoded into the - * stream. XDR_DECODE causes the type to be extracted from the stream. - * XDR_FREE can be used to release the space allocated by an XDR_DECODE - * request. - */ -enum xdr_op { - XDR_ENCODE=0, - XDR_DECODE=1, - XDR_FREE=2 -}; - -/* - * This is the number of bytes per unit of external data. - */ -#define BYTES_PER_XDR_UNIT (4) -#define RNDUP(x) ((((x) + BYTES_PER_XDR_UNIT - 1) / BYTES_PER_XDR_UNIT) \ - * BYTES_PER_XDR_UNIT) - -/* - * The XDR handle. - * Contains operation which is being applied to the stream, - * an operations vector for the paticular implementation (e.g. see xdr_mem.c), - * and two private fields for the use of the particular impelementation. - */ -typedef struct __rpc_xdr { - enum xdr_op x_op; /* operation; fast additional param */ - struct xdr_ops { - /* get a long from underlying stream */ - bool_t (*x_getlong) __P((struct __rpc_xdr *, long *)); - /* put a long to " */ - bool_t (*x_putlong) __P((struct __rpc_xdr *, long *)); - /* get some bytes from " */ - bool_t (*x_getbytes) __P((struct __rpc_xdr *, caddr_t, u_int)); - /* put some bytes to " */ - bool_t (*x_putbytes) __P((struct __rpc_xdr *, caddr_t, u_int)); - /* returns bytes off from beginning */ - u_int (*x_getpostn) __P((struct __rpc_xdr *)); - /* lets you reposition the stream */ - bool_t (*x_setpostn) __P((struct __rpc_xdr *, u_int)); - /* buf quick ptr to buffered data */ - int32_t *(*x_inline) __P((struct __rpc_xdr *, u_int)); - /* free privates of this xdr_stream */ - void (*x_destroy) __P((struct __rpc_xdr *)); - } *x_ops; - caddr_t x_public; /* users' data */ - caddr_t x_private; /* pointer to private data */ - caddr_t x_base; /* private used for position info */ - int x_handy; /* extra private word */ -} XDR; - -/* - * A xdrproc_t exists for each data type which is to be encoded or decoded. - * - * The second argument to the xdrproc_t is a pointer to an opaque pointer. - * The opaque pointer generally points to a structure of the data type - * to be decoded. If this pointer is 0, then the type routines should - * allocate dynamic storage of the appropriate size and return it. - * - * XXX can't actually prototype it, because some take three args!!! - */ -typedef bool_t (*xdrproc_t) __P((/* XDR *, void *, u_int */)); - -/* - * Operations defined on a XDR handle - * - * XDR *xdrs; - * long *longp; - * caddr_t addr; - * u_int len; - * u_int pos; - */ -#define XDR_GETLONG(xdrs, longp) \ - (*(xdrs)->x_ops->x_getlong)(xdrs, longp) -#define xdr_getlong(xdrs, longp) \ - (*(xdrs)->x_ops->x_getlong)(xdrs, longp) - -#define XDR_PUTLONG(xdrs, longp) \ - (*(xdrs)->x_ops->x_putlong)(xdrs, longp) -#define xdr_putlong(xdrs, longp) \ - (*(xdrs)->x_ops->x_putlong)(xdrs, longp) - -#define XDR_GETBYTES(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) -#define xdr_getbytes(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_getbytes)(xdrs, addr, len) - -#define XDR_PUTBYTES(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) -#define xdr_putbytes(xdrs, addr, len) \ - (*(xdrs)->x_ops->x_putbytes)(xdrs, addr, len) - -#define XDR_GETPOS(xdrs) \ - (*(xdrs)->x_ops->x_getpostn)(xdrs) -#define xdr_getpos(xdrs) \ - (*(xdrs)->x_ops->x_getpostn)(xdrs) - -#define XDR_SETPOS(xdrs, pos) \ - (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) -#define xdr_setpos(xdrs, pos) \ - (*(xdrs)->x_ops->x_setpostn)(xdrs, pos) - -#define XDR_INLINE(xdrs, len) \ - (*(xdrs)->x_ops->x_inline)(xdrs, len) -#define xdr_inline(xdrs, len) \ - (*(xdrs)->x_ops->x_inline)(xdrs, len) - -#define XDR_DESTROY(xdrs) \ - if ((xdrs)->x_ops->x_destroy) \ - (*(xdrs)->x_ops->x_destroy)(xdrs) -#define xdr_destroy(xdrs) \ - if ((xdrs)->x_ops->x_destroy) \ - (*(xdrs)->x_ops->x_destroy)(xdrs) - -/* - * Support struct for discriminated unions. - * You create an array of xdrdiscrim structures, terminated with - * a entry with a null procedure pointer. The xdr_union routine gets - * the discriminant value and then searches the array of structures - * for a matching value. If a match is found the associated xdr routine - * is called to handle that part of the union. If there is - * no match, then a default routine may be called. - * If there is no match and no default routine it is an error. - */ -#define NULL_xdrproc_t ((xdrproc_t)0) -struct xdr_discrim { - int value; - xdrproc_t proc; -}; - -/* - * In-line routines for fast encode/decode of primitve data types. - * Caveat emptor: these use single memory cycles to get the - * data from the underlying buffer, and will fail to operate - * properly if the data is not aligned. The standard way to use these - * is to say: - * if ((buf = XDR_INLINE(xdrs, count)) == NULL) - * return (FALSE); - * <<< macro calls >>> - * where ``count'' is the number of bytes of data occupied - * by the primitive data types. - * - * N.B. and frozen for all time: each data type here uses 4 bytes - * of external representation. - */ -#define IXDR_GET_LONG(buf) ((long)ntohl((u_long)*(buf)++)) -#define IXDR_PUT_LONG(buf, v) (*(buf)++ = (long)htonl((u_long)v)) - -#define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf)) -#define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf)) -#define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf)) -#define IXDR_GET_SHORT(buf) ((short)IXDR_GET_LONG(buf)) -#define IXDR_GET_U_SHORT(buf) ((u_short)IXDR_GET_LONG(buf)) - -#define IXDR_PUT_BOOL(buf, v) IXDR_PUT_LONG((buf), ((long)(v))) -#define IXDR_PUT_ENUM(buf, v) IXDR_PUT_LONG((buf), ((long)(v))) -#define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), ((long)(v))) -#define IXDR_PUT_SHORT(buf, v) IXDR_PUT_LONG((buf), ((long)(v))) -#define IXDR_PUT_U_SHORT(buf, v) IXDR_PUT_LONG((buf), ((long)(v))) - -/* - * These are the "generic" xdr routines. - */ -__BEGIN_DECLS -extern bool_t xdr_void __P((void)); -extern bool_t xdr_int __P((XDR *, int *)); -extern bool_t xdr_u_int __P((XDR *, u_int *)); -extern bool_t xdr_long __P((XDR *, long *)); -extern bool_t xdr_u_long __P((XDR *, u_long *)); -extern bool_t xdr_short __P((XDR *, short *)); -extern bool_t xdr_u_short __P((XDR *, u_short *)); -extern bool_t xdr_int16_t __P((XDR *, int16_t *)); -extern bool_t xdr_u_int16_t __P((XDR *, u_int16_t *)); -extern bool_t xdr_int32_t __P((XDR *, int32_t *)); -extern bool_t xdr_u_int32_t __P((XDR *, u_int32_t *)); -extern bool_t xdr_bool __P((XDR *, bool_t *)); -extern bool_t xdr_enum __P((XDR *, enum_t *)); -extern bool_t xdr_array __P((XDR *, char **, u_int *, u_int, u_int, xdrproc_t)); -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 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)); -extern bool_t xdr_float __P((XDR *, float *)); -extern bool_t xdr_double __P((XDR *, double *)); -extern bool_t xdr_reference __P((XDR *, caddr_t *, u_int, xdrproc_t)); -extern bool_t xdr_pointer __P((XDR *, caddr_t *, u_int, xdrproc_t)); -extern bool_t xdr_wrapstring __P((XDR *, char **)); -extern void xdr_free __P((xdrproc_t, char *)); -__END_DECLS - -/* - * Common opaque bytes objects used by many rpc protocols; - * declared here due to commonality. - */ - -#define MAX_NETOBJ_SZ 2048 -struct netobj { - u_int n_len; - char *n_bytes; -}; -typedef struct netobj netobj; -extern bool_t xdr_netobj __P((XDR *, struct netobj *)); - -/* - * These are the public routines for the various implementations of - * xdr streams. - */ -__BEGIN_DECLS -/* XDR using memory buffers */ -extern void xdrmem_create __P((XDR *, char *, u_int, enum xdr_op)); - -#ifdef _STDIO_H_ -/* XDR using stdio library */ -extern void xdrstdio_create __P((XDR *, FILE *, enum xdr_op)); -#endif - -/* XDR pseudo records for tcp */ -extern void xdrrec_create __P((XDR *, u_int, u_int, char *, - int (*) __P((caddr_t, caddr_t, int)), - int (*) __P((caddr_t, caddr_t, int)))); - -/* make end of xdr record */ -extern bool_t xdrrec_endofrecord __P((XDR *, int)); - -/* move to beginning of next record */ -extern bool_t xdrrec_skiprecord __P((XDR *)); - -/* true if no more input */ -extern bool_t xdrrec_eof __P((XDR *)); -__END_DECLS - -#endif /* !_RPC_XDR_H */ diff --git a/utils/gssd/Makefile.am b/utils/gssd/Makefile.am index d152525..2115a9e 100644 --- a/utils/gssd/Makefile.am +++ b/utils/gssd/Makefile.am @@ -37,14 +37,11 @@ gssd_SOURCES = \ krb5_util.h \ write_bytes.h -gssd_LDADD = -lrpcsecgss -lgssapi -ldl $(KRBLIBS) +gssd_LDADD = $(RPCSECGSS_LIBS) $(KRBLIBS) gssd_LDFLAGS = -Wl,-rpath=$(KRBDIR)/lib -gssd_CPPFLAGS = -I$(top_srcdir)/support/rpc/include \ - $(AM_CPPFLAGS) $(CPPFLAGS) - gssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \ - $(KRBCFLAGS) + $(RPCSECGSS_CFLAGS) $(KRBCFLAGS) svcgssd_SOURCES = \ $(COMMON_SRCS) \