'\"macro stdmacro
.if n .pH g3n.rpc_clnt_au @(#)rpc_clnt_au	40.4 of 10/10/89
.\" Copyright 1989 AT&T
.\" ident	"@(#)svid_rs:rs_lib/rpc_clnt_auth	1.4"
.\" @(#)rpc_clnt_aut 1.4 89/07/20 SMI;
'\" macro stdmacro
.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
.nr X
.if \nX=0 .ds x} rpc_clnt_auth 3N "" "\&"
.if \nX=1 .ds x} rpc_clnt_auth 3N ""
.if \nX=2 .ds x} rpc_clnt_auth 3N "" "\&"
.if \nX=3 .ds x} rpc_clnt_auth "" "" "\&"
.TH \*(x}
.SH NAME
\f4rpc_clnt_auth\fP: \f4 auth_destroy\f1, \f4authnone_create\f1, \f4authsys_create\f1, \f4authsys_create_default\f1 \- library routines for client side remote procedure call authentication
.SH DESCRIPTION
.P
These routines are part of the
RPC
library that allows C language programs to make procedure
calls on other machines across the network,
with desired authentication.
First, the client calls a procedure to send a
data packet to the server.
Upon receipt of the packet,
the server calls a dispatch routine
to perform the requested service,
and then sends back a reply.
.P
These routines are normally called after creating the
\f4CLIENT\fP
handle.
The client's authentication information
is passed to the server when the
RPC
call is made.
.SS Routines
.P
The following routines require that the header
\f4rpc.h\f1
be included [see \f4rpc\fP(3N) for the definition of the \f4AUTH\fP
data structure].
.P
.ft 4
.nf
.sp .5
#include <rpc/rpc.h>
.fi
.ft 1
.br
.if t .ne 8
.P
.ft 4
.nf
.sp .5
void
auth_destroy(AUTH *auth);
.fi
.ft 1
.IP
A function macro that destroys the authentication
information associated with
\f2auth\f1.
Destruction usually involves deallocation
of private data structures.
The use of
\f2auth\f1
is undefined after calling
\f4auth_destroy\f1.
.br
.if t .ne 6
.P
.ft 4
.nf
.sp .5
AUTH *
authnone_create(void);
.fi
.ft 1
.IP
Create and return an RPC
authentication handle that passes nonusable
authentication information with each remote
procedure call.
This is the default authentication used by RPC.
.br
.if t .ne 10
.P
.ft 4
.nf
.sp .5
AUTH *
authsys_create(const char *host, const uid_t uid, const gid_t gid,
	const int len, const gid_t *aup_gids);
.fi
.ft 1
.IP
Create and return an RPC
authentication handle that contains
\f4AUTH_SYS\fP
authentication information.
The parameter
\f2host\f1
is the name of the machine on which the information was
created;
\f2uid\f1
is the user's user ID;
\f2gid\f1
is the user's current group ID;
\f2len\f1
and
\f2aup_gids\f1
refer to a counted array of groups to which the user belongs.
.br
.if t .ne 5
.P
.ft 4
.nf
.sp .5
AUTH *
authsys_create_default(void);
.fi
.ft 1
.IP
Call
\f4authsys_create\f1
with the appropriate parameters.
.SH SEE ALSO
.na
\f4rpc\fP(3N),
\f4rpc_clnt_create\fP(3N),
\f4rpc_clnt_calls\fP(3N).
.ad
