getprojuser(3c)

getprojuser, fgetprojuser - get a user's project IDs

As shipped in IRIX 6.5.7. Unchanged since IRIX 6.5.

NAME
     getprojuser, fgetprojuser - get a user's project IDs

SYNOPSIS
     #include <proj.h>

     int getprojuser(const char *name, projid_t *buf, int len);

     int fgetprojuser(PROJ token, const char *name, projid_t *buf, int len);

DESCRIPTION
     The getprojuser function searches the project file for the user name and
     stores information about the projects for which name is authorized into
     an array of projid_t structs.  The array is pointed to by buf and is
     assumed to have room for a maximum of len entries.  The projid_t struct
     is defined in <proj.h> and has the following format:

          #define MAXPROJNAMELEN 32
          typedef struct projid {
                  char    proj_name[MAXPROJNAMELEN];      /* project name */
                  prid_t  proj_id;                        /* project ID */
          } projid_t;

     Note that project names that have more than MAXPROJNAMELEN-1 characters
     will be truncated.  The proj_name field is always null-terminated.

     The fgetprojuser function is a variant of getprojuser that uses a PROJ
     token to make it more efficient for repeated use.  Otherwise its
     operation is identical.  For more details on creating a PROJ token, see
     openproj(3C).

FILES
     /etc/projid    System project name to project ID mappings.

     /etc/project   System project authorization file.

SEE ALSO
     closeproj(3C), getdfltprojuser(3C), getprojall(3C), openproj(3C),
     projid(4), projects(5).

DIAGNOSTICS
     getprojuser and fgetprojuser both return the number of projid_t's stored
     (which may be 0 if the user was not found or if the user is not
     authorized for any projects) or -1 if an error occurred.

BUGS
     Both functions use fopen(3S) and are thus subject to its limitations.

     Project information should be (optionally) obtained via NIS.