VMS Help  —  CRTL  geteuid
    With POSIX IDs disabled, this function is equivalent to getuid
    and returns the member number (in OpenVMS terms) from the user
    identification code (UIC).

    With POSIX IDs enabled, this function returns the effective user
    ID.

    Format

      #include  <unistd.h>

      uid_t geteuid  (void);

1  –  Description

    The geteuid function can be used with POSIX style identifiers
    (IDs) or with UIC-based identifiers.

    POSIX style IDs are supported on OpenVMS Version 7.3-2 and
    higher.

    With POSIX style IDs disabled (the default), the geteuid and
    getuid functions are equivalent and return the member number from
    the current UIC as follows:

    o  For programs compiled with the _VMS_V6_SOURCE feature-
       test macro or programs that do not include the <unistd.h>
       header file, the getuid and geteuid functions return the
       member number of the OpenVMS UIC. For example, if the UIC
       is [313,31], then the member number, 31, is returned.

    o  For programs compiled without the _VMS_V6_SOURCE feature-
       test macro that do include the <unistd.h> header file, the
       full UIC is returned in decimal after converting the octal
       representation to decimal. For example, if the UIC is [313,
       31] then 13303833 is returned. (13303833 = 25 + 203 * 65536;
       Octal 31 = 25 decimal; Octal 313 = 203 decimal.)

    With POSIX style IDs enabled, geteuid returns the effective user
    ID of the calling process, and getuid returns the real user ID of
    the calling process.

    See also getegid and getgid.

2  –  Return Value

    x                  The effective user ID (POSIX IDs enabled), or
                       the member number from the current UIC or the
                       full UIC (POSIX IDs disabled).
Close Help