xref: /minix/lib/libc/rpc/rpc_clnt_auth.3 (revision ebfedea0)
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.6 2003/04/16 13:34:43 wiz 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.Dv CLIENT
35handle.
36The
37.Fa cl_auth
38field of the
39.Dv CLIENT
40structure should be initialized by the
41.Dv 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.Fn auth
63is undefined after calling
64.Fn auth_destroy .
65.Pp
66.It Fn authnone_create
67Create and return an RPC
68authentication handle that passes nonusable
69authentication information with each remote procedure call.
70This is the default authentication used by RPC.
71.Pp
72.It Fn authsys_create
73Create and return an RPC authentication handle that contains
74.Dv AUTH_SYS
75authentication information.
76The parameter
77.Fa host
78is the name of the machine on which the information was
79created;
80.Fa uid
81is the user's user ID;
82.Fa gid
83is the user's current group ID;
84.Fa len
85and
86.Fa aup_gids
87refer to a counted array of groups to which the user belongs.
88.Pp
89.It Fn authsys_create_default
90Call
91.Fn authsys_create
92with the appropriate parameters.
93.El
94.Sh SEE ALSO
95.Xr rpc 3 ,
96.Xr rpc_clnt_calls 3 ,
97.Xr rpc_clnt_create 3
98