summaryrefslogtreecommitdiff
path: root/modules/pam_access
diff options
context:
space:
mode:
authorTomas Mraz <tm@t8m.info>2006-08-30 16:09:05 +0000
committerTomas Mraz <tm@t8m.info>2006-08-30 16:09:05 +0000
commit160a0b2ce1d8c5fb9acf3faa506094df285996f3 (patch)
tree37e4bd047b4c07e086d7249a0edab76c39df5930 /modules/pam_access
parent424578c5c4a5edbd79142c9348f4eda689530651 (diff)
Relevant BUGIDs:
Purpose of commit: new feature Commit summary: --------------- 2006-08-30 Tomas Mraz <t8m@centrum.cz> * modules/pam_access/pam_access.8.xml: All services supported. * modules/pam_access/pam_access.c (pam_sm_open_session): New. (pam_sm_close_session): New. (pam_sm_chauthtok): New. * modules/pam_access/pam_succeed_if.8.xml: All services supported. * modules/pam_access/pam_succeed_if.c (pam_sm_setcred): Return PAM_IGNORE rather than success. (pam_sm_open_session): New. (pam_sm_close_session): New. (pam_sm_chauthtok): New.
Diffstat (limited to 'modules/pam_access')
-rw-r--r--modules/pam_access/pam_access.8.xml2
-rw-r--r--modules/pam_access/pam_access.c29
2 files changed, 27 insertions, 4 deletions
diff --git a/modules/pam_access/pam_access.8.xml b/modules/pam_access/pam_access.8.xml
index a7a28d4a..74e39993 100644
--- a/modules/pam_access/pam_access.8.xml
+++ b/modules/pam_access/pam_access.8.xml
@@ -129,7 +129,7 @@
<refsect1 id="pam_access-services">
<title>MODULE SERVICES PROVIDED</title>
<para>
- The <option>auth</option> and <option>account</option> services are supported.
+ All services are supported.
</para>
</refsect1>
diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c
index ffb3c353..80d94cc9 100644
--- a/modules/pam_access/pam_access.c
+++ b/modules/pam_access/pam_access.c
@@ -55,6 +55,8 @@
#define PAM_SM_AUTH
#define PAM_SM_ACCOUNT
+#define PAM_SM_SESSION
+#define PAM_SM_PASSWORD
#include <security/_pam_macros.h>
#include <security/pam_modules.h>
@@ -811,6 +813,27 @@ pam_sm_acct_mgmt (pam_handle_t *pamh, int flags,
return pam_sm_authenticate (pamh, flags, argc, argv);
}
+PAM_EXTERN int
+pam_sm_open_session(pam_handle_t *pamh, int flags,
+ int argc, const char **argv)
+{
+ return pam_sm_authenticate(pamh, flags, argc, argv);
+}
+
+PAM_EXTERN int
+pam_sm_close_session(pam_handle_t *pamh, int flags,
+ int argc, const char **argv)
+{
+ return pam_sm_authenticate(pamh, flags, argc, argv);
+}
+
+PAM_EXTERN int
+pam_sm_chauthtok(pam_handle_t *pamh, int flags,
+ int argc, const char **argv)
+{
+ return pam_sm_authenticate(pamh, flags, argc, argv);
+}
+
/* end of module definition */
#ifdef PAM_STATIC
@@ -822,8 +845,8 @@ struct pam_module _pam_access_modstruct = {
pam_sm_authenticate,
pam_sm_setcred,
pam_sm_acct_mgmt,
- NULL,
- NULL,
- NULL
+ pam_sm_open_session,
+ pam_sm_close_session,
+ pam_sm_chauthtok
};
#endif