xref: /freebsd/lib/libc/rpc/rpc_clnt_auth.3 (revision 71e8eac4fd89dedbcb4130379add151d3ed942fa)
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$
7.Dd May 7, 1993
8.Dt RPC_CLNT_AUTH 3
9.Os
10.Sh NAME
11.Nm auth_destroy ,
12.Nm authnone_create ,
13.Nm authsys_create ,
14.Nm authsys_create_default
15.Nd library routines for client side remote procedure call authentication
16.Sh LIBRARY
17.Lb libc
18.Sh SYNOPSIS
19.In rpc/rpc.h
20.Ft "void"
21.Fn auth_destroy "AUTH *auth"
22.Ft "AUTH *"
23.Fn authnone_create "void"
24.Ft "AUTH *"
25.Fn authsys_create "const char *host" "const uid_t uid" "const gid_t gid" "const int len" "const gid_t *aup_gids"
26.Ft "AUTH *"
27.Fn authsys_create_default "void"
28.Sh DESCRIPTION
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.Vt CLIENT
36handle.
37The
38.Va cl_auth
39field of the
40.Vt CLIENT
41structure should be initialized by the
42.Vt 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.Sh Routines
55.Bl -tag -width authsys_create_default()
56.It Fn auth_destroy
57A function macro that destroys the authentication
58information associated with
59.Fa auth .
60Destruction usually involves deallocation
61of private data structures.
62The use of
63.Fa auth
64is undefined after calling
65.Fn auth_destroy .
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.It Fn authsys_create
72Create and return an RPC authentication handle that contains
73.Dv AUTH_SYS
74authentication information.
75The
76.Fa host
77argument
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.It Fn authsys_create_default
89Call
90.Fn authsys_create
91with the appropriate arguments.
92.El
93.Sh SEE ALSO
94.Xr rpc 3 ,
95.Xr rpc_clnt_calls 3 ,
96.Xr rpc_clnt_create 3
97