1pam_sm_open_session(3PAM)    PAM Library Functions   pam_sm_open_session(3PAM)
2
3
4

NAME

6       pam_sm_open_session,  pam_sm_close_session - service provider implemen‐
7       tation for pam_open_session and pam_close_session
8

SYNOPSIS

10       cc [ flag ... ]  file ... -lpam [ library ... ]
11       #include <security/pam_appl.h>
12       #include <security/pam_modules.h>
13
14
15
16       int pam_sm_open_session(pam_handle_t *pamh, int flags,
17            int argc, const char **argv);
18
19
20       int pam_sm_close_session(pam_handle_t *pamh, int flags,
21            int argc, const char **argv);
22
23

DESCRIPTION

25       In response to a  call  to  pam_open_session(3PAM)  and  pam_close_ses‐
26       sion(3PAM),   the    PAM   framework  calls  pam_sm_open_session()  and
27       pam_sm_close_session(), respectively from the  modules  listed  in  the
28       pam.conf(4)  file.   The session management provider supplies the back-
29       end functionality for this interface function.
30
31
32       The pam_sm_open_session() function is called to initiate  session  man‐
33       agement.  Thepam_sm_close_session()  function is invoked when a session
34       has terminated. The argument pamh is an authentication handle. The fol‐
35       lowing flag may be set in the flags field:
36
37       PAM_SILENT    Session service should not generate any messages.
38
39
40
41       The  argc  argument  represents  the number of module options passed in
42       from the configuration file  pam.conf(4).  argv  specifies  the  module
43       options,  which are interpreted and processed by the session management
44       service. If an unknown option is passed in, an error should  be  logged
45       through syslog(3C) and the option ignored.
46

RETURN VALUES

48       Upon  successful  completion,  PAM_SUCCESS should be returned. The fol‐
49       lowing values may also be returned upon error:
50
51       PAM_SESSION_ERR    Cannot make or remove an  entry  for  the  specified
52                          session.
53
54
55       PAM_IGNORE         Ignore   underlying  session  module  regardless  of
56                          whether the control  flag is required,  optional  or
57                          sufficient.
58
59

ATTRIBUTES

61       See attributes(5) for description of the following attributes:
62
63
64
65
66       ┌─────────────────────────────┬─────────────────────────────┐
67       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
68       ├─────────────────────────────┼─────────────────────────────┤
69       │Interface Stability          │ Stable                      │
70       ├─────────────────────────────┼─────────────────────────────┤
71       │MT-Level                     │MT-Safe with exceptions      │
72       └─────────────────────────────┴─────────────────────────────┘
73

SEE ALSO

75       pam(3PAM),     pam_open_session(3PAM),     syslog(3C),    libpam(3LIB),
76       pam.conf(4), attributes(5)
77

NOTES

79       The interfaces in  libpam are MT-Safe only if each  thread  within  the
80       multithreaded application uses its own  PAM handle.
81
82
83
84SunOS 5.11                        13 Oct 1998        pam_sm_open_session(3PAM)
Impressum