Session Management Function: PAM_EXTERN int pam_sm_open_session(pam_handle_t* pamh, int flags, int argc, const char** argv); Macro used: PAM_SM_SESSION The function instructs the module that a session should be opened for this user. The session may be opened by one application and closed by another, so the module should be ready to handle this case. The flags parameter may contain PAM_SILENT or 0. Valid return values: PAM_SUCCESS - the sessio was opened successfully. PAM_SESSION_ERR - an error occured.