Blast-Radius Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

audit_get_session - Get a program's login session id value

Author

Steve Grubb Red Hat Dec 2016 AUDIT_GET_SESSION(3)

Description

This function returns the task's session id attribute.

Errors

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.

Name

audit_get_session - Get a program's login session id value

Return Value

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.

See Also

audit_getloginuid(3).

Synopsis

#include<libaudit.h> uin32_t audit_get_session(void);

See Also