Merge branch 'vendor/FILE'
[dragonfly.git] / lib / libc / rpc / rpc_clnt_auth.3
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: src/lib/libc/rpc/rpc_clnt_auth.3,v 1.6 2005/02/09 18:03:14 ru Exp $
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
29 These routines are part of the
30 RPC library that allows C language programs to make procedure
31 calls on other machines across the network,
32 with desired authentication.
33 .Pp
34 These routines are normally called after creating the
35 .Vt CLIENT
36 handle.
37 The
38 .Va cl_auth
39 field of the
40 .Vt CLIENT
41 structure should be initialized by the
42 .Vt AUTH
43 structure returned by some of the following routines.
44 The client's authentication information
45 is passed to the server when the
46 RPC
47 call is made.
48 .Pp
49 Only the
50 .Dv NULL
51 and the
52 .Dv SYS
53 style of authentication is discussed here.
54 .Sh Routines
55 .Bl -tag -width authsys_create_default()
56 .It Fn auth_destroy
57 A function macro that destroys the authentication
58 information associated with
59 .Fa auth .
60 Destruction usually involves deallocation
61 of private data structures.
62 The use of
63 .Fa auth
64 is undefined after calling
65 .Fn auth_destroy .
66 .It Fn authnone_create
67 Create and return an RPC
68 authentication handle that passes nonusable
69 authentication information with each remote procedure call.
70 This is the default authentication used by RPC.
71 .It Fn authsys_create
72 Create and return an RPC authentication handle that contains
73 .Dv AUTH_SYS
74 authentication information.
75 The
76 .Fa host
77 argument
78 is the name of the machine on which the information was
79 created;
80 .Fa uid
81 is the user's user ID;
82 .Fa gid
83 is the user's current group ID;
84 .Fa len
85 and
86 .Fa aup_gids
87 refer to a counted array of groups to which the user belongs.
88 .It Fn authsys_create_default
89 Call
90 .Fn authsys_create
91 with 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