dpns_getidmap man page

DPNS_GETIDMAP(3)            DPNS Library Functions            DPNS_GETIDMAP(3)

      dpns_getidmap   -  get  virtual  uid/gid(s)  associated  with  a  given

      [1m#include <sys/types.h>[0m
      [1m#include "dpns_api.h"[0m

      [1mint dpns_getidmap (const  char  *[4m[22musername[24m[1m,  int  [4m[22mnbgroups[24m[1m,  const  char[0m
      [1m**[4m[22mgroupnames[24m[1m, uid_t *[4m[22muserid[24m[1m, gid_t *[4m[22mgids[24m[1m)[0m

      [1mint  dpns_getidmapc  (const  char  *[4m[22musername[24m[1m,  const char *[4m[22muser_ca[24m[1m, int[0m
      [4mnbgroups[24m[1m, const char **[4m[22mgroupnames[24m[1m, uid_t *[4m[22muserid[24m[1m, gid_t *[4m[22mgids[24m[1m)[0m

      [1mdpns_getidmap [22mgets the  virtual  uid/gid(s)  associated  with  a  given
      dn/role(s).   If  the  dn or any of the roles does not exist yet in the
      Database an entry is added to the mapping table.

             specifies the user name (dn).  It must be at most 255 characters

             specifies  the  CA  from the user proxy.  It must be at most 255
             characters long.

             is the number of group names.

             is the address of an array of group names (vo/role).  Each group
             name  must  be at most 255 characters long.  This pointer can be
             NULL.  In this case the vo is obtained  from  a  static  mapping

      [4muserid[24m specifies  the  address  of a buffer to receive the Virtual User

      [4mgids[24m   specifies the address of a buffer to receive the  Virtual  Group
             Ids.   It  must be big enough to receive [4mnbgroups[24m group ids, but
             at least one group id in case [4mnbgroups[24m is zero.

      This routine returns 0 if the operation was successful  or  -1  if  the
      operation failed. In the latter case, [1mserrno [22mis set appropriately.

      [1mENOMEM       [22mMemory could not be allocated in the server to receive the
                   group names or to send back the gids.

      [1mEACCES       [22mOne of [4musername[24m, [4muser_ca[24m or the primary (first)  group  is

      [1mEFAULT       [4m[22musername[24m, [4muserid[24m or [4mgids[24m is a NULL pointer.

      [1mEINVAL       [4m[22mnbgroups[24m is negative or the length of [4musername[24m, [4muser_ca[24m or
                   of one of the group names exceeds 255.

      [1mSENOSHOST    [22mHost unknown.

      [1mSENOSSERV    [22mService unknown.

      [1mSECOMERR     [22mCommunication error.

      [1mSENOMAPFND   DISABLEAUTOVIDS [22mis set and [4musername[24m or one of  the  groups
                   does not exist.

      [1mENSNACT      [22mName server is not running or is being shutdown.

DPNS         $Date: 2010-08-04 09:58:47 +0200 (Wed, 04 Aug 2010D)PN$S_GETIDMAP(3)