1door_ucred(3C)           Standard C Library Functions           door_ucred(3C)
2
3
4

NAME

6       door_ucred - return credential information associated with the client
7

SYNOPSIS

9       cc -mt [ flag... ] file... [ library... ]
10       #include <door.h>
11
12       int door_ucred(ucred_t **info);
13
14

DESCRIPTION

16       The   door_ucred()  function  returns credential information associated
17       with the client, if any, of the current door invocation.
18
19
20       When successful, door_ucred() writes a pointer to a user credential  to
21       the  location  pointed to by info if that location was previously NULL.
22       If that location was non-null, door_ucred() assumes that info points to
23       a  previously  allocated  ucred_t  which  is  then reused. The location
24       pointed to by info can be used multiple times before being  freed.  The
25       value returned in info must be freed using ucred_free(3C).
26
27
28       The  resulting user credential includes information about the effective
29       user and group ID, the real user and group ID, all privilege  sets  and
30       the calling PID.
31
32
33       The  credential  information  associated  with the client refers to the
34       information from the immediate caller, not necessarily from  the  first
35       thread in a chain of door calls.
36

RETURN VALUES

38       Upon  successful  completion,  door_ucred() returns 0. Otherwise, -1 is
39       returned and errno is set to indicate the error, in which case the mem‐
40       ory location pointed to by the info argument is unchanged.
41

ERRORS

43       The door_ucred() function will fail if:
44
45       EAGAIN    The  location pointed to by info was NULL and allocating mem‐
46                 ory sufficient to hold a ucred failed.
47
48
49       EFAULT    The address of the info argument is invalid.
50
51
52       EINVAL    There is no associated door client.
53
54
55       ENOMEM    The location pointed to by info was NULL and allocating  mem‐
56                 ory sufficient to hold a ucred failed.
57
58

ATTRIBUTES

60       See attributes(5) for descriptions of the following attributes:
61
62
63
64
65       ┌─────────────────────────────┬─────────────────────────────┐
66       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
67       ├─────────────────────────────┼─────────────────────────────┤
68       │Interface Stability          │Stable                       │
69       ├─────────────────────────────┼─────────────────────────────┤
70       │MT-Level                     │Safe                         │
71       └─────────────────────────────┴─────────────────────────────┘
72

SEE ALSO

74       door_call(3C), door_create(3C), ucred_get(3C), attributes(5)
75
76
77
78SunOS 5.11                        22 Mar 2005                   door_ucred(3C)
Impressum