lfc_getidmap man page

LFC_GETIDMAP(3)              LFC Library Functions             LFC_GETIDMAP(3)

[1mNAME[0m
      lfc_getidmap   -   get  virtual  uid/gid(s)  associated  with  a  given
      dn/role(s)

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

      [1mint lfc_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  lfc_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

[1mDESCRIPTION[0m
      [1mlfc_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.

      [4musername[0m
             specifies the user name (dn).  It must be at most 255 characters
             long.

      [4muser_ca[0m
             specifies  the  CA  from the user proxy.  It must be at most 255
             characters long.

      [4mnbgroups[0m
             is the number of group names.

      [4mgroupnames[0m
             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
             file.

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

      [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.

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

[1mERRORS[0m
      [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
                   banned.

      [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.

LFC          $Date: 2010-08-04 09:58:47 +0200 (Wed, 04 Aug 2010)LF$C_GETIDMAP(3)