summaryrefslogtreecommitdiffstats
path: root/libpam/pam_session.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpam/pam_session.c')
-rw-r--r--libpam/pam_session.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/libpam/pam_session.c b/libpam/pam_session.c
new file mode 100644
index 0000000..cb393c1
--- /dev/null
+++ b/libpam/pam_session.c
@@ -0,0 +1,45 @@
+/* pam_session.c - PAM Session Management */
+
+/*
+ * $Id$
+ */
+
+#include "pam_private.h"
+
+#include <stdio.h>
+
+int pam_open_session(pam_handle_t *pamh, int flags)
+{
+ int retval;
+
+ D(("called"));
+
+ IF_NO_PAMH("pam_open_session", pamh, PAM_SYSTEM_ERR);
+
+ if (__PAM_FROM_MODULE(pamh)) {
+ D(("called from module!?"));
+ return PAM_SYSTEM_ERR;
+ }
+ retval = _pam_dispatch(pamh, flags, PAM_OPEN_SESSION);
+
+ return retval;
+}
+
+int pam_close_session(pam_handle_t *pamh, int flags)
+{
+ int retval;
+
+ D(("called"));
+
+ IF_NO_PAMH("pam_close_session", pamh, PAM_SYSTEM_ERR);
+
+ if (__PAM_FROM_MODULE(pamh)) {
+ D(("called from module!?"));
+ return PAM_SYSTEM_ERR;
+ }
+
+ retval = _pam_dispatch(pamh, flags, PAM_CLOSE_SESSION);
+
+ return retval;
+
+}