RPC_GSS_SECCREATE(3) | Library Functions Manual | RPC_GSS_SECCREATE(3) |
RPCSEC_GSS
—
GSS-API based authentication for RPC
#include
<rpc/rpcsec_gss.h>
RPCSEC_GSS
is a security mechanism for the
RPC protocol. It uses the Generic Security Service API (GSS-API) to
establish a security context between a client and a server and to ensure
that all subsequent communication between client and server are properly
authenticated. Optionally, extra protection can be applied to the
connection. The integrity service uses checksums to ensure that all data
sent by a peer is received without modification. The privacy service uses
encryption to ensure that no third party can access the data for a
connection.
To use this system, an application must
first use
rpc_gss_seccreate
()
to establish a security context.
Data structures used by RPCSEC_GSS
appear
below.
rpc_gss_seccreate
().
typedef enum { rpc_gss_svc_default = 0, rpc_gss_svc_none = 1, rpc_gss_svc_integrity = 2, rpc_gss_svc_privacy = 3 } rpc_gss_service_t;
typedef struct { int req_flags; /* GSS request bits */ int time_req; /* requested lifetime */ gss_cred_id_t my_cred; /* GSS credential */ gss_channel_bindings_t input_channel_bindings; } rpc_gss_options_req_t;
typedef struct { int major_status; int minor_status; u_int rpcsec_version; int ret_flags; int time_req; gss_ctx_id_t gss_context; char actual_mechanism[MAX_GSS_MECH]; } rpc_gss_options_ret_t;
rpc_gss_get_principal_name
()
and is also referenced by the rpc_gss_rawcred_t
structure.
typedef struct { int len; char name[1]; } *rpc_gss_principal_t;
typedef struct { u_int version; /* RPC version number */ const char *mechanism; /* security mechanism */ const char *qop; /* quality of protection */ rpc_gss_principal_t client_principal; /* client name */ const char *svc_principal; /* server name */ rpc_gss_service_t service; /* service type */ } rpc_gss_rawcred_t;
rpc_gss_getcred
().
typedef struct { uid_t uid; /* user ID */ gid_t gid; /* group ID */ short gidlen; gid_t *gidlist; /* list of groups */ } rpc_gss_ucred_t;
typedef struct { bool_t locked; rpc_gss_rawcred_t *raw_cred; } rpc_gss_lock_t;
rpc_gss_set_callback
().
typedef struct { u_int program; /* RPC program number */ u_int version; /* RPC version number */ /* user defined callback */ bool_t (*callback)(struct svc_req *req, gss_cred_id_t deleg, gss_ctx_id_t gss_context, rpc_gss_lock_t *lock, void **cookie); } rpc_gss_callback_t;
rpc_gss_get_error
().
typedef struct { int rpc_gss_error; int system_error; /* same as errno */ } rpc_gss_error_t; /* * Values for rpc_gss_error */ #define RPC_GSS_ER_SUCCESS 0 /* no error */ #define RPC_GSS_ER_SYSTEMERROR 1 /* system error */
RPCSEC_GSS
protocolThese functions are part of libtirpc.
This manual page was written by Doug Rabson ⟨dfr@FreeBSD.org⟩.
January 26, 2010 | Debian |