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