pam_open_session - open a user session
#include <security/pam_appl.h>
int pam_open_session (
pam_handle_t *pamh,
int flags
);
Thepam_open_session() function opens a new session for a user previously authenticated with a call topam_authenticate() .If successful, the function returns [PAM_SUCCESS].
The arguments for
pam_open_session() are:
- pamh (in)
The PAM handle, which has been returned from a previous call topam_start() .
- flags (in)
Flags may be set to PAM_SILENT to disable messages from the session service.
In many instances the
pam_open_session() andpam_close_session() calls may be made by different processes. For example, in UNIX the login process opens a session, while the init process closes the session. In this case the, UTMP/WTMP entries may be used to link the call topam_close_session() with an earlier call topam_open_session() . This is possible because UTMP/WTMP entries are uniquely identified by a combination of attributes, including the user login name and device name, which are accessible through the PAM handle, pamh. The call topam_open_session() should precede UTMP/WTMP entry management and the call topam_close_session() should follow UTMP/WTMP exit management.
The following PAM status codes shall be returned:
- [PAM_SUCCESS]
Successful completion.
- [PAM_SESSION_ERR]
There has been a failure in creating or removing an entry for the specified session.
- [PAM_PERM_DENIED]
The caller does not possess the required authority.
- [PAM_OPEN_ERR]
Failure when dynamically loading a service module.
- [PAM_SYMBOL_ERR]
Symbol not found in service module.
- [PAM_SERVICE_ERR]
Error in service module.
- [PAM_SYSTEM_ERR]
System error.
- [PAM_BUF_ERR]
Memory buffer error.
- [PAM_CONV_ERR]
Conversation error.
[??] Some characters or strings that appear in the printed document are not easily representable using HTML.
Contents | Next section | Index |