xref: /netbsd-src/lib/libc/rpc/rpc_clnt_auth.3 (revision f37e55afc4d53fd96eaf86c412fbc99c3229b1a2)
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.2 2001/09/16 02:17:41 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.Fd #include <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
28.Pp
29These routines are part of the
30RPC library that allows C language programs to make procedure
31calls on other machines across the network,
32with desired authentication.
33.Pp
34These routines are normally called after creating the
35.Dv CLIENT
36handle.
37The
38.Fa cl_auth
39field of the
40.Dv CLIENT
41structure should be initialized by the
42.Dv AUTH
43structure returned by some of the following routines.
44The client's authentication information
45is passed to the server when the
46RPC
47call is made.
48.Pp
49Only the
50.Dv NULL
51and the
52.Dv SYS
53style of authentication is discussed here.
54.Pp
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.Fn auth
65is undefined after calling
66.Fn auth_destroy .
67.Pp
68.It Fn authnone_create
69Create and return an RPC
70authentication handle that passes nonusable
71authentication information with each remote procedure call.
72This is the default authentication used by RPC.
73.Pp
74.It Fn authsys_create
75Create and return an RPC authentication handle that contains
76.Dv AUTH_SYS
77authentication information.
78The parameter
79.Fa host
80is the name of the machine on which the information was
81created;
82.Fa uid
83is the user's user ID;
84.Fa gid
85is the user's current group ID;
86.Fa len
87and
88.Fa aup_gids
89refer to a counted array of groups to which the user belongs.
90.Pp
91.It Fn authsys_create_default
92Call
93.Fn authsys_create
94with the appropriate parameters.
95.El
96.Sh SEE ALSO
97.Xr rpc 3 ,
98.Xr rpc_clnt_calls 3 ,
99.Xr rpc_clnt_create 3 ,
100