1getauusernam(3BSM)  Security and Auditing Library Functions getauusernam(3BSM)
2
3
4

NAME

6       getauusernam,   getauuserent,   setauuser,  endauuser,  getauusernam_r,
7       getauuserent_r - get audit_user entry
8

SYNOPSIS

10       cc [ flag... ] file... -lbsm   -lsocket    -lnsl   [ library... ]
11       #include <sys/param.h>
12       #include <bsm/libbsm.h>
13
14       struct au_user_ent *getauusernam(const char *name);
15
16
17       struct au_user_ent *getauuserent(void);
18
19
20       void setauuser(void);
21
22
23       void endauuser(void);
24
25
26       struct au_user_ent *getauusernam_r(au_user_ent_t  *u, const char *name);
27
28
29       struct au_user_ent *getauuserent_r(au_user_ent_t *u);
30
31

DESCRIPTION

33       The getauuserent(), getauusernam(),  getauuserent_r(),  and  getauuser‐
34       nam_r()  functions  each  return  an audit_user entry. Entries can come
35       from any of the sources specified in the /etc/nsswitch.conf  file  (see
36       nsswitch.conf(4)).
37
38
39       The   getauusernam()  and  getauusernam_r()  functions  search  for  an
40       audit_user entry with a given login name name.
41
42
43       The getauuserent() and getauuserent_r() functions enumerate  audit_user
44       entries; successive calls to these functions will return either succes‐
45       sive audit_user entries or NULL.
46
47
48       The setauuser() function "rewinds" to the beginning of the  enumeration
49       of  audit_user  entries.   Calls to getauusernam() and getauusernam_r()
50       may leave the enumeration in an  indeterminate  state,  so  setauuser()
51       should  be called before the first call to getauuserent() or getauuser‐
52       ent_r().
53
54
55       The endauuser() function may be called to indicate that audit_user pro‐
56       cessing  is  complete;  the  system  may then close any open audit_user
57       file, deallocate storage, and so forth.
58
59
60       The getauuserent_r() and getauusernam_r() functions  both  take  as  an
61       argument  a  pointer  to  an au_user_ent that is returned on successful
62       function calls.
63
64
65       The internal representation of an audit_user entry  is  an  au_user_ent
66       structure defined in <bsm/libbsm.h> with the following members:
67
68         char        *au_name;
69         au_mask_t   au_always;
70         au_mask_t   au_never;
71
72

RETURN VALUES

74       The  getauusernam()  function returns a pointer to a au_user_ent struc‐
75       ture if it successfully  locates  the  requested  entry.  Otherwise  it
76       returns NULL.
77
78
79       The  getauuserent()  function returns a pointer to a au_user_ent struc‐
80       ture if it successfully enumerates an entry. Otherwise it returns NULL,
81       indicating the end of the enumeration.
82

USAGE

84       The  functionality  described  on this manual page is available only if
85       the Solaris Auditing has been enabled.  See bsmconv(1M) for more infor‐
86       mation.
87

FILES

89       /etc/security/audit_user    file that stores per-user audit event mask
90
91
92       /etc/passwd                 file  that  stores user ID to username map‐
93                                   pings
94
95

ATTRIBUTES

97       See attributes(5) for descriptions of the following attributes:
98
99
100
101
102       ┌─────────────────────────────┬─────────────────────────────┐
103       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
104       ├─────────────────────────────┼─────────────────────────────┤
105       │MT-Level                     │MT-Safe with exceptions      │
106       └─────────────────────────────┴─────────────────────────────┘
107

SEE ALSO

109       bsmconv(1M), getpwnam(3C), audit_user(4), nsswitch.conf(4),  passwd(4),
110       attributes(5)
111

NOTES

113       All  information for the getauuserent() and getauusernam() functions is
114       contained in a static area, so it must be copied if it is to be saved.
115
116
117       The getauusernam() and getauuserent() functions are  Unsafe  in  multi‐
118       threaded  applications. The getauusernam_r() and getauuserent_r() func‐
119       tions provide the same functionality with interfaces that are MT-Safe.
120
121
122
123SunOS 5.11                        31 Mar 2005               getauusernam(3BSM)
Impressum