| 1 |
.\" @(#)rpc_clnt_auth.3n 1.21 93/05/07 SMI; from SVr4 |
| 2 |
.\" Copyright 1989 AT&T |
| 3 |
.\" @(#)rpc_clnt_auth 1.4 89/07/20 SMI; |
| 4 |
.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved. |
| 5 |
.\" $NetBSD: rpc_clnt_auth.3,v 1.1 2000/06/03 09:29:50 fvdl Exp $ |
| 6 |
.\" $FreeBSD: src/lib/libc/rpc/rpc_clnt_auth.3,v 1.5 2002/12/19 09:40:23 ru Exp $ |
| 7 |
.Dd May 7, 1993 |
| 8 |
.Dt RPC_CLNT_AUTH 3 |
| 9 |
.Os |
| 10 |
.Sh NAME |
| 11 |
.Nm auth_destroy , |
| 12 |
.Nm authnone_create , |
| 13 |
.Nm authsys_create , |
| 14 |
.Nm authsys_create_default |
| 15 |
.Nd library routines for client side remote procedure call authentication |
| 16 |
.Sh SYNOPSIS |
| 17 |
.In rpc/rpc.h |
| 18 |
.Ft "void" |
| 19 |
.Fn auth_destroy "AUTH *auth" |
| 20 |
.Ft "AUTH *" |
| 21 |
.Fn authnone_create "void" |
| 22 |
.Ft "AUTH *" |
| 23 |
.Fn authsys_create "const char *host" "const uid_t uid" "const gid_t gid" "const int len" "const gid_t *aup_gids" |
| 24 |
.Ft "AUTH *" |
| 25 |
.Fn authsys_create_default "void" |
| 26 |
.Sh DESCRIPTION |
| 27 |
These routines are part of the |
| 28 |
RPC library that allows C language programs to make procedure |
| 29 |
calls on other machines across the network, |
| 30 |
with desired authentication. |
| 31 |
.Pp |
| 32 |
These routines are normally called after creating the |
| 33 |
.Vt CLIENT |
| 34 |
handle. |
| 35 |
The |
| 36 |
.Va cl_auth |
| 37 |
field of the |
| 38 |
.Vt CLIENT |
| 39 |
structure should be initialized by the |
| 40 |
.Vt AUTH |
| 41 |
structure returned by some of the following routines. |
| 42 |
The client's authentication information |
| 43 |
is passed to the server when the |
| 44 |
RPC |
| 45 |
call is made. |
| 46 |
.Pp |
| 47 |
Only the |
| 48 |
.Dv NULL |
| 49 |
and the |
| 50 |
.Dv SYS |
| 51 |
style of authentication is discussed here. |
| 52 |
.Sh Routines |
| 53 |
.Bl -tag -width authsys_create_default() |
| 54 |
.It Fn auth_destroy |
| 55 |
A function macro that destroys the authentication |
| 56 |
information associated with |
| 57 |
.Fa auth . |
| 58 |
Destruction usually involves deallocation |
| 59 |
of private data structures. |
| 60 |
The use of |
| 61 |
.Fa auth |
| 62 |
is undefined after calling |
| 63 |
.Fn auth_destroy . |
| 64 |
.It Fn authnone_create |
| 65 |
Create and return an RPC |
| 66 |
authentication handle that passes nonusable |
| 67 |
authentication information with each remote procedure call. |
| 68 |
This is the default authentication used by RPC. |
| 69 |
.It Fn authsys_create |
| 70 |
Create and return an RPC authentication handle that contains |
| 71 |
.Dv AUTH_SYS |
| 72 |
authentication information. |
| 73 |
The |
| 74 |
.Fa host |
| 75 |
argument |
| 76 |
is the name of the machine on which the information was |
| 77 |
created; |
| 78 |
.Fa uid |
| 79 |
is the user's user ID; |
| 80 |
.Fa gid |
| 81 |
is the user's current group ID; |
| 82 |
.Fa len |
| 83 |
and |
| 84 |
.Fa aup_gids |
| 85 |
refer to a counted array of groups to which the user belongs. |
| 86 |
.It Fn authsys_create_default |
| 87 |
Call |
| 88 |
.Fn authsys_create |
| 89 |
with the appropriate arguments. |
| 90 |
.El |
| 91 |
.Sh AVAILABILITY |
| 92 |
These functions are part of libtirpc. |
| 93 |
.Sh SEE ALSO |
| 94 |
.Xr rpc 3 , |
| 95 |
.Xr rpc_clnt_calls 3 , |
| 96 |
.Xr rpc_clnt_create 3 |