summaryrefslogtreecommitdiff
path: root/usr/src/man/man3nsl/rpc_gss_get_principal_name.3nsl
blob: ac7d749af5abdfa8c848cf557252ceac420f3809 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
'\" te
.\" Copyright (C) 2002, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH RPC_GSS_GET_PRINCIPAL_NAME 3NSL "November 22, 2021"
.SH NAME
rpc_gss_get_principal_name \- Get principal names at server
.SH SYNOPSIS
.nf
#include <rpc/rpcsec_gss.h>

\fBbool_t\fR \fBrpc_gss_get_principal_name\fR(\fBrpc_gss_principal_t\fR \fI*principal\fR,
     \fBchar\fR \fI*mech\fR, \fBchar\fR \fI*name\fR, \fBchar\fR \fI*node\fR, \fBchar\fR \fI*domain\fR);
.fi

.SH DESCRIPTION
Servers need to be able to operate on a client's principal name. Such a name is
stored by the server as a  \fBrpc_gss_principal_t\fR structure, an opaque byte
string which can be used either directly in access control lists or as database
indices which can be used to look up a UNIX credential. A server may, for
example, need to compare a principal name it has received with the principal
name of a known entity, and to do that, it must be able to generate
\fBrpc_gss_principal_t\fR structures from known entities.
.sp
.LP
\fBrpc_gss_get_principal_name()\fR takes as input a security mechanism, a
pointer to a \fBrpc_gss_principal_t\fR structure, and several parameters which
uniquely identify an entity on a network: a user or service name, a node name,
and a domain name.  From these parameters it constructs a unique,
mechanism-dependent principal name of the \fBrpc_gss_principal_t\fR structure
type.
.SH PARAMETERS
How many of the identifying parameters (\fIname\fR, \fInode\fR, and
\fIdomain\fR) are necessary to specify depends on the mechanism being used.
For example, Kerberos V5 requires only a user name but can accept a node and
domain name. An application can choose to set unneeded parameters to
\fINULL.\fR
.sp
.LP
Information on RPCSEC_GSS data types for parameters may be found on the
\fBrpcsec_gss\fR(3NSL) man page.
.sp
.ne 2
.na
\fB\fIprincipal\fR \fR
.ad
.RS 14n
An opaque, mechanism-dependent structure representing the client's principal
name.
.RE

.sp
.ne 2
.na
\fB\fImech\fR \fR
.ad
.RS 14n
An ASCII string representing the security mechanism in use.  Valid strings may
be found in the \fB/etc/gss/mech\fR file, or by using
\fBrpc_gss_get_mechanisms()\fR.
.RE

.sp
.ne 2
.na
\fB\fIname\fR \fR
.ad
.RS 14n
A  UNIX login name (for example, 'gwashington') or service name, such as 'nfs'.
.RE

.sp
.ne 2
.na
\fB\fInode\fR \fR
.ad
.RS 14n
A node in a domain; typically, this would be a machine name (for
example, 'valleyforge').
.RE

.sp
.ne 2
.na
\fB\fIdomain\fR \fR
.ad
.RS 14n
A security domain; for example, a DNS or NIS domain name
('eng.example.com').
.RE

.SH RETURN VALUES
\fBrpc_gss_get_principal_name()\fR returns  TRUE if it is successful;
otherwise, use  \fBrpc_gss_get_error()\fR to get the error associated with the
failure.
.SH FILES
.ne 2
.na
\fB\fB/etc/gss/mech\fR \fR
.ad
.RS 18n
File containing valid security mechanisms
.RE

.SH ATTRIBUTES
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
MT-Level	MT-Safe
.TE

.SH SEE ALSO
.BR free (3C),
.BR rpc (3NSL),
.BR rpc_gss_get_mechanisms (3NSL),
.BR rpc_gss_set_svc_name (3NSL),
.BR rpcsec_gss (3NSL),
.BR mech (5),
.BR attributes (7)
.sp
.LP
\fIONC+ Developer\&'s Guide\fR
.sp
.LP
Linn, J. \fIRFC 2078, Generic Security Service Application Program Interface, Version 2\fR. Network Working Group. January 1997.