1DPNS_GETIDMAP(3)            DPNS Library Functions            DP‐
2NS_GETIDMAP(3)
3
4
5
6[1mNAME[0m
7       dpns_getidmap   ‐  get   virtual   uid/gid(s)   associated
8with  a  given
9       dn/role(s)
10
11[1mSYNOPSIS[0m
12       [1m#include <sys/types.h>[0m
13       [1m#include "dpns_api.h"[0m
14
15       [1mint    dpns_getidmap    (const    char    *[4m[22muser‐
16name[24m[1m,  int  [4m[22mnbgroups[24m[1m,  const  char[0m
17       [1m**[4m[22mgroupnames[24m[1m,                       uid_t
18*[4m[22muserid[24m[1m, gid_t *[4m[22mgids[24m[1m)[0m
19
20       [1mint    dpns_getidmapc    (const    char   *[4m[22muser‐
21name[24m[1m,  const char *[4m[22muser_ca[24m[1m, int[0m
22       [4mnbgroups[24m[1m, const char **[4m[22mgroupnames[24m[1m,
23uid_t *[4m[22muserid[24m[1m, gid_t *[4m[22mgids[24m[1m)[0m
24
25[1mDESCRIPTION[0m
26       [1mdpns_getidmap  [22mgets the  virtual  uid/gid(s)  asso‐
27ciated  with  a  given
28       dn/role(s).   If  the  dn or any of the roles does not ex‐
29ist yet in the
30       Database an entry is added to the mapping table.
31
32       [4musername[0m
33              specifies  the  user name (dn).  It must be at most
34255 characters
35              long.
36
37       [4muser_ca[0m
38              specifies  the  CA  from the user proxy.   It  must
39be at most 255
40              characters long.
41
42       [4mnbgroups[0m
43              is the number of group names.
44
45       [4mgroupnames[0m
46              is   the   address  of  an  array  of  group  names
47(vo/role).  Each group
48              name  must  be at most 255 characters  long.   This
49pointer can be
50              NULL.   In  this  case  the vo is obtained  from  a
51static  mapping
52              file.
53
54       [4muserid[24m specifies  the  address  of a buffer to  re‐
55ceive the Virtual User
56              Id.
57
58       [4mgids[24m   specifies the address of a buffer to receive
59the  Virtual  Group
60              Ids.   It  must be  big  enough  to  receive  [4mn‐
61bgroups[24m group ids, but
62              at  least  one  group id in case [4mnbgroups[24m is
63zero.
64
65[1mRETURN VALUE[0m
66       This routine returns 0 if the operation was successful  or
67‐1  if  the
68       operation failed. In the latter case, [1mserrno [22mis set
69appropriately.
70
71[1mERRORS[0m
72       [1mENOMEM       [22mMemory could not be allocated  in  the
73server to receive the
74                    group names or to send back the gids.
75
76       [1mEACCES       [22mOne of [4musername[24m, [4muser_ca[24m
77or the primary (first)  group  is
78                    banned.
79
80       [1mEFAULT        [4m[22musername[24m,   [4muserid[24m   or
81[4mgids[24m is a NULL pointer.
82
83       [1mEINVAL        [4m[22mnbgroups[24m  is  negative  or the
84length of [4musername[24m, [4muser_ca[24m or
85                    of one of the group names exceeds 255.
86
87       [1mSENOSHOST    [22mHost unknown.
88
89       [1mSENOSSERV    [22mService unknown.
90
91       [1mSECOMERR     [22mCommunication error.
92
93       [1mSENOMAPFND   DISABLEAUTOVIDS [22mis  set  and  [4muser‐
94name[24m or one of  the  groups
95                    does not exist.
96
97       [1mENSNACT      [22mName server is not running or is being
98shutdown.
99
100
101
102DPNS                                $Date$                    DP‐
103NS_GETIDMAP(3)
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
Impressum