| 1 |
.TH "AUDIT_GET_SESSION" "3" "Dec 2016" "Red Hat" "Linux Audit API" |
| 2 |
.SH NAME |
| 3 |
audit_get_session \- Get a program's login session id value |
| 4 |
.SH SYNOPSIS |
| 5 |
.nf |
| 6 |
.B #include <libaudit.h> |
| 7 |
.PP |
| 8 |
.BI "uint32_t audit_get_session(void);" |
| 9 |
.fi |
| 10 |
|
| 11 |
.SH DESCRIPTION |
| 12 |
This function returns the task's session id attribute. |
| 13 |
|
| 14 |
.SH "RETURN VALUE" |
| 15 |
|
| 16 |
This function returns the session id value if it was set. It will return a \-1 if the session id is unset. However, since uint32_t is an unsigned type, you will see the converted value instead of \-1. |
| 17 |
|
| 18 |
.SH "ERRORS" |
| 19 |
|
| 20 |
This function returns \-2 on failure. Additionally, in the event of a real error, errno would be set. The function can set errno based on failures of open, read, or strtoul. |
| 21 |
|
| 22 |
.SH "SEE ALSO" |
| 23 |
|
| 24 |
.BR audit_getloginuid (3). |
| 25 |
|
| 26 |
.SH AUTHOR |
| 27 |
Steve Grubb |