1rpc_gss_getcred(3NSL)Networking Services Library Functionsrpc_gss_getcred(3NSL)
2
3
4
6 rpc_gss_getcred - get credentials of client
7
9 #include <rpc/rpcsec_gss.h>
10
11 bool_t rpc_gss_getcred(struct svc_req *req, rpc_gss_rawcred_ t **rcred,
12 rpc_gss_ucred **ucred, void **cookie);
13
14
16 rpc_gss_getcred() is used by a server to fetch the credentials of a
17 client. These credentials may either be network credentials (in the
18 form of a rpc_gss_rawcred_t structure) or UNIX credentials.
19
20
21 For more information on RPCSEC_GSS data types, see the rpcsec_gss(3NSL)
22 man page.
23
25 Essentially, rpc_gss_getcred() passes a pointer to a request (svc_req)
26 as well as pointers to two credential structures and a user-defined
27 cookie; if rpc_gss_getcred() is successful, at least one credential
28 structure is "filled out" with values, as is, optionally, the cookie.
29
30 req Pointer to the received service request. svc_req is an RPC
31 structure containing information on the context of an RPC
32 invocation, such as program, version, and transport informa‐
33 tion.
34
35
36 rcred A pointer to an rpc_gss_rawcred_t structure pointer. This
37 structure contains the version number of the RPCSEC_GSS pro‐
38 tocol being used; the security mechanism and QOPs for this
39 session (as strings); principal names for the client (as a
40 rpc_gss_principal_t structure) and server (as a string); and
41 the security service (integrity, privacy, etc., as an enum).
42 If an application is not interested in these values, it may
43 pass NULL for this parameter.
44
45
46 ucred The caller's UNIX credentials, in the form of a pointer to a
47 pointer to a rpc_gss_ucred_t structure, which includes the
48 client's uid and gids. If an application is not interested
49 in these values, it may pass NULL for this parameter.
50
51
52 cookie A four-byte quantity that an application may use in any man‐
53 ner it wants to; RPC does not interpret it. (For example, a
54 cookie may be a pointer or index to a structure that repre‐
55 sents a context initiator.) See also rpc_gss_set_call‐
56 back(3NSL).
57
58
60 rpc_gss_getcred() returns TRUE if it is successful; otherwise, use
61 rpc_gss_get_error() to get the error associated with the failure.
62
64 See attributes(5) for descriptions of the following attributes:
65
66
67
68
69 ┌─────────────────────────────┬─────────────────────────────┐
70 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
71 ├─────────────────────────────┼─────────────────────────────┤
72 │MT-Level │MT-Safe │
73 ├─────────────────────────────┼─────────────────────────────┤
74 │Availability │SUNWrsg (32-bit) │
75 ├─────────────────────────────┼─────────────────────────────┤
76 │ │SUNWrsgx (64-bit) │
77 └─────────────────────────────┴─────────────────────────────┘
78
80 rpc(3NSL), rpc_gss_set_callback(3NSL), rpc_gss_set_svc_name(3NSL), rpc‐
81 sec_gss(3NSL), attributes(5)
82
83
84 ONC+ Developer's Guide
85
86
87 Linn, J. RFC 2078, Generic Security Service Application Program Inter‐
88 face, Version 2. Network Working Group. January 1997.
89
90
91
92SunOS 5.11 5 Feb 2002 rpc_gss_getcred(3NSL)