1explain_getresuid_or_die(3)Library Functions Manualexplain_getresuid_or_die(3)
2
3
4

NAME

6       explain_getresuid_or_die - get r/e/s user IDs and report errors
7

SYNOPSIS

9       #include <libexplain/getresuid.h>
10       void explain_getresuid_or_die(uid_t *ruid, uid_t *euid, uid_t *suid);
11       int explain_getresuid_on_error(uid_t *ruid, uid_t *euid, uid_t *suid);
12

DESCRIPTION

14       The  explain_getresuid_or_die function is used to call the getresuid(2)
15       system call. On failure an  explanation  will  be  printed  to  stderr,
16       obtained  from  the explain_getresuid(3) function, and then the process
17       terminates by calling exit(EXIT_FAILURE).
18
19       The explain_getresuid_on_error function is  used  to  call  the  getre‐
20       suid(2)  system  call.  On  failure  an  explanation will be printed to
21       stderr, obtained from  the  explain_getresuid(3)  function,  but  still
22       returns to the caller.
23
24       ruid    The  ruid,  exactly  as to be passed to the getresuid(2) system
25               call.
26
27       euid    The euid, exactly as to be passed to  the  getresuid(2)  system
28               call.
29
30       suid    The  suid,  exactly  as to be passed to the getresuid(2) system
31               call.
32

RETURN VALUE

34       The explain_getresuid_or_die function  only  returns  on  success,  see
35       getresuid(2)  for  more  information. On failure, prints an explanation
36       and exits, it does not return.
37
38       The explain_getresuid_on_error function always returns the value return
39       by the wrapped getresuid(2) system call.
40

EXAMPLE

42       The explain_getresuid_or_die function is intended to be used in a fash‐
43       ion similar to the following example:
44              explain_getresuid_or_die(ruid, euid, suid);
45

SEE ALSO

47       getresuid(2)
48               get real, effective and saved user IDs
49
50       explain_getresuid(3)
51               explain getresuid(2) errors
52
53       exit(2) terminate the calling process
54
56       libexplain version 1.4
57       Copyright (C) 2012 Peter Miller
58
59
60
61                                                   explain_getresuid_or_die(3)
Impressum