xref: /netbsd-src/lib/libc/rpc/rpc_clnt_auth.3 (revision fb8fd3ef27289040fe2b2413d2f41972b5157f88)
18bf1d5a0Sfvdl.\" @(#)rpc_clnt_auth.3n 1.21 93/05/07 SMI; from SVr4
28bf1d5a0Sfvdl.\" Copyright 1989 AT&T
38bf1d5a0Sfvdl.\" @(#)rpc_clnt_auth 1.4 89/07/20 SMI;
48bf1d5a0Sfvdl.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
5*fb8fd3efSchristos.\"	$NetBSD: rpc_clnt_auth.3,v 1.7 2020/10/03 18:31:29 christos Exp $
6*fb8fd3efSchristos.Dd October 3, 2020
78bf1d5a0Sfvdl.Dt RPC_CLNT_AUTH 3
88bf1d5a0Sfvdl.Os
98bf1d5a0Sfvdl.Sh NAME
108bf1d5a0Sfvdl.Nm auth_destroy ,
118bf1d5a0Sfvdl.Nm authnone_create ,
128bf1d5a0Sfvdl.Nm authsys_create ,
13*fb8fd3efSchristos.Nm authsys_create_default ,
14*fb8fd3efSchristos.Nm set_rpc_maxgrouplist
158bf1d5a0Sfvdl.Nd library routines for client side remote procedure call authentication
168bf1d5a0Sfvdl.Sh LIBRARY
178bf1d5a0Sfvdl.Lb libc
188bf1d5a0Sfvdl.Sh SYNOPSIS
19472351e1Swiz.In rpc/rpc.h
208bf1d5a0Sfvdl.Ft "void"
218bf1d5a0Sfvdl.Fn auth_destroy "AUTH *auth"
228bf1d5a0Sfvdl.Ft "AUTH *"
238bf1d5a0Sfvdl.Fn authnone_create "void"
248bf1d5a0Sfvdl.Ft "AUTH *"
258bf1d5a0Sfvdl.Fn authsys_create "const char *host" "const uid_t uid" "const gid_t gid" "const int len" "const gid_t *aup_gids"
268bf1d5a0Sfvdl.Ft "AUTH *"
278bf1d5a0Sfvdl.Fn authsys_create_default "void"
28*fb8fd3efSchristos.Ft "void"
29*fb8fd3efSchristos.Fn set_rpc_maxgrouplist "int num"
308bf1d5a0Sfvdl.Sh DESCRIPTION
318bf1d5a0SfvdlThese routines are part of the
328bf1d5a0SfvdlRPC library that allows C language programs to make procedure
338bf1d5a0Sfvdlcalls on other machines across the network,
348bf1d5a0Sfvdlwith desired authentication.
358bf1d5a0Sfvdl.Pp
368bf1d5a0SfvdlThese routines are normally called after creating the
378bf1d5a0Sfvdl.Dv CLIENT
388bf1d5a0Sfvdlhandle.
398bf1d5a0SfvdlThe
408bf1d5a0Sfvdl.Fa cl_auth
418bf1d5a0Sfvdlfield of the
428bf1d5a0Sfvdl.Dv CLIENT
438bf1d5a0Sfvdlstructure should be initialized by the
448bf1d5a0Sfvdl.Dv AUTH
458bf1d5a0Sfvdlstructure returned by some of the following routines.
468bf1d5a0SfvdlThe client's authentication information
478bf1d5a0Sfvdlis passed to the server when the
488bf1d5a0SfvdlRPC
498bf1d5a0Sfvdlcall is made.
508bf1d5a0Sfvdl.Pp
518bf1d5a0SfvdlOnly the
528bf1d5a0Sfvdl.Dv NULL
538bf1d5a0Sfvdland the
548bf1d5a0Sfvdl.Dv SYS
558bf1d5a0Sfvdlstyle of authentication is discussed here.
56723dbf64Swiz.Sh ROUTINES
578bf1d5a0Sfvdl.Bl -tag -width authsys_create_default()
588bf1d5a0Sfvdl.It Fn auth_destroy
598bf1d5a0SfvdlA function macro that destroys the authentication
608bf1d5a0Sfvdlinformation associated with
618bf1d5a0Sfvdl.Fa auth .
628bf1d5a0SfvdlDestruction usually involves deallocation
638bf1d5a0Sfvdlof private data structures.
648bf1d5a0SfvdlThe use of
658bf1d5a0Sfvdl.Fn auth
668bf1d5a0Sfvdlis undefined after calling
678bf1d5a0Sfvdl.Fn auth_destroy .
688bf1d5a0Sfvdl.Pp
698bf1d5a0Sfvdl.It Fn authnone_create
708bf1d5a0SfvdlCreate and return an RPC
718bf1d5a0Sfvdlauthentication handle that passes nonusable
728bf1d5a0Sfvdlauthentication information with each remote procedure call.
738bf1d5a0SfvdlThis is the default authentication used by RPC.
748bf1d5a0Sfvdl.Pp
758bf1d5a0Sfvdl.It Fn authsys_create
768bf1d5a0SfvdlCreate and return an RPC authentication handle that contains
778bf1d5a0Sfvdl.Dv AUTH_SYS
788bf1d5a0Sfvdlauthentication information.
798bf1d5a0SfvdlThe parameter
808bf1d5a0Sfvdl.Fa host
818bf1d5a0Sfvdlis the name of the machine on which the information was
828bf1d5a0Sfvdlcreated;
838bf1d5a0Sfvdl.Fa uid
848bf1d5a0Sfvdlis the user's user ID;
858bf1d5a0Sfvdl.Fa gid
868bf1d5a0Sfvdlis the user's current group ID;
878bf1d5a0Sfvdl.Fa len
888bf1d5a0Sfvdland
898bf1d5a0Sfvdl.Fa aup_gids
908bf1d5a0Sfvdlrefer to a counted array of groups to which the user belongs.
918bf1d5a0Sfvdl.Pp
928bf1d5a0Sfvdl.It Fn authsys_create_default
938bf1d5a0SfvdlCall
948bf1d5a0Sfvdl.Fn authsys_create
958bf1d5a0Sfvdlwith the appropriate parameters.
96*fb8fd3efSchristos.Pp
97*fb8fd3efSchristos.It Fn set_rpc_maxgrouplist
98*fb8fd3efSchristosAllow the application to set the maximum size of the group list
99*fb8fd3efSchristosthat will be used in
100*fb8fd3efSchristos.Fn authunix_create_default to
101*fb8fd3efSchristos.Fa num .
102*fb8fd3efSchristosSome servers will refuse mounts if the group list is larger than it expects
103*fb8fd3efSchristos(like 8).
1048bf1d5a0Sfvdl.El
1058bf1d5a0Sfvdl.Sh SEE ALSO
1068bf1d5a0Sfvdl.Xr rpc 3 ,
1078bf1d5a0Sfvdl.Xr rpc_clnt_calls 3 ,
108723dbf64Swiz.Xr rpc_clnt_create 3
109