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