1DPNS_GETIDMAP(3)            DPNS Library Functions            DPNS_GETIDMAP(3)
2
3
4

NAME

6       dpns_getidmap   -  get  virtual  uid/gid(s)  associated  with  a  given
7       dn/role(s)
8

SYNOPSIS

10       #include <sys/types.h>
11       #include "dpns_api.h"
12
13       int dpns_getidmap (const  char  *username,  int  nbgroups,  const  char
14       **groupnames, uid_t *userid, gid_t *gids)
15
16       int  dpns_getidmapc  (const  char  *username,  const char *user_ca, int
17       nbgroups, const char **groupnames, uid_t *userid, gid_t *gids)
18

DESCRIPTION

20       dpns_getidmap gets the  virtual  uid/gid(s)  associated  with  a  given
21       dn/role(s).   If  the  dn or any of the roles does not exist yet in the
22       Database an entry is added to the mapping table.
23
24       username
25              specifies the user name (dn).  It must be at most 255 characters
26              long.
27
28       user_ca
29              specifies  the  CA  from the user proxy.  It must be at most 255
30              characters long.
31
32       nbgroups
33              is the number of group names.
34
35       groupnames
36              is the address of an array of group names (vo/role).  Each group
37              name  must  be at most 255 characters long.  This pointer can be
38              NULL.  In this case the vo is obtained  from  a  static  mapping
39              file.
40
41       userid specifies  the  address  of a buffer to receive the Virtual User
42              Id.
43
44       gids   specifies the address of a buffer to receive the  Virtual  Group
45              Ids.   It  must be big enough to receive nbgroups group ids, but
46              at least one group id in case nbgroups is zero.
47

RETURN VALUE

49       This routine returns 0 if the operation was successful  or  -1  if  the
50       operation failed. In the latter case, serrno is set appropriately.
51

ERRORS

53       ENOMEM       Memory could not be allocated in the server to receive the
54                    group names or to send back the gids.
55
56       EACCES       One of username, user_ca or the primary (first)  group  is
57                    banned.
58
59       EFAULT       username, userid or gids is a NULL pointer.
60
61       EINVAL       nbgroups is negative or the length of username, user_ca or
62                    of one of the group names exceeds 255.
63
64       SENOSHOST    Host unknown.
65
66       SENOSSERV    Service unknown.
67
68       SECOMERR     Communication error.
69
70       SENOMAPFND   DISABLEAUTOVIDS is set and username or one of  the  groups
71                    does not exist.
72
73       ENSNACT      Name server is not running or is being shutdown.
74
75
76
77DPNS         $Date: 2010-08-04 09:58:47 +0200 (Wed, 04 Aug 2010D)PN$S_GETIDMAP(3)
Impressum