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