1PAM_END(3)                     Linux-PAM Manual                     PAM_END(3)
2
3
4

NAME

6       pam_end - termination of PAM transaction
7

SYNOPSIS

9       #include <security/pam_appl.h>
10
11       int pam_end(pam_handle_t *pamh, int pam_status);
12

DESCRIPTION

14       The pam_end function terminates the PAM transaction and is the last
15       function an application should call in the PAM context. Upon return the
16       handle pamh is no longer valid and all memory associated with it will
17       be invalid.
18
19       The pam_status argument should be set to the value returned to the
20       application by the last PAM library call.
21
22       The value taken by pam_status is used as an argument to the module
23       specific callback function, cleanup() (See pam_set_data(3) and
24       pam_get_data(3)). In this way the module can be given notification of
25       the pass/fail nature of the tear-down process, and perform any last
26       minute tasks that are appropriate to the module before it is unlinked.
27       This argument can be logically OR'd with PAM_DATA_SILENT to indicate to
28       indicate that the module should not treat the call too seriously. It is
29       generally used to indicate that the current closing of the library is
30       in a fork(2)ed process, and that the parent will take care of cleaning
31       up things that exist outside of the current process space (files etc.).
32
33       This function free's all memory for items associated with the
34       pam_set_item(3) and pam_get_item(3) functions. Pointers associated with
35       such objects are not valid anymore after pam_end was called.
36

RETURN VALUES

38       PAM_SUCCESS
39           Transaction was successful terminated.
40
41       PAM_SYSTEM_ERR
42           System error, for example a NULL pointer was submitted as PAM
43           handle or the function was called by a module.
44

SEE ALSO

46       pam_get_data(3), pam_set_data(3), pam_start(3), pam_strerror(3)
47
48
49
50Linux-PAM Manual                  06/08/2020                        PAM_END(3)
Impressum