diff options
author | Tomas Mraz <tm@t8m.info> | 2006-08-30 16:09:05 +0000 |
---|---|---|
committer | Tomas Mraz <tm@t8m.info> | 2006-08-30 16:09:05 +0000 |
commit | 160a0b2ce1d8c5fb9acf3faa506094df285996f3 (patch) | |
tree | 37e4bd047b4c07e086d7249a0edab76c39df5930 | |
parent | 424578c5c4a5edbd79142c9348f4eda689530651 (diff) | |
download | linux-pam-git-160a0b2ce1d8c5fb9acf3faa506094df285996f3.tar.gz |
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.
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | modules/pam_access/pam_access.8.xml | 2 | ||||
-rw-r--r-- | modules/pam_access/pam_access.c | 29 | ||||
-rw-r--r-- | modules/pam_succeed_if/pam_succeed_if.8.xml | 3 | ||||
-rw-r--r-- | modules/pam_succeed_if/pam_succeed_if.c | 28 |
6 files changed, 67 insertions, 11 deletions
@@ -1,3 +1,17 @@ +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. + 2006-08-30 Thorsten Kukuk <kukuk@thkukuk.de> * xtests/Makefile.am: Move shell code to execute tests from here ... @@ -4,7 +4,7 @@ Linux-PAM NEWS -- history of user-visible changes. Release 0.99.6.3 * pam_loginuid: New PAM module. - +* pam_access, pam_succeed_if: Support passwd and session services. Release 0.99.6.2 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 diff --git a/modules/pam_succeed_if/pam_succeed_if.8.xml b/modules/pam_succeed_if/pam_succeed_if.8.xml index 1b57a652..b7ad29e6 100644 --- a/modules/pam_succeed_if/pam_succeed_if.8.xml +++ b/modules/pam_succeed_if/pam_succeed_if.8.xml @@ -218,8 +218,7 @@ <refsect1 id="pam_succeed_if-services"> <title>MODULE SERVICES PROVIDED</title> <para> - The <emphasis remap='B'>auth</emphasis> and - <emphasis remap='B'>account</emphasis> services are supported. + All services are supported. </para> </refsect1> diff --git a/modules/pam_succeed_if/pam_succeed_if.c b/modules/pam_succeed_if/pam_succeed_if.c index 51510de8..4f33ba2e 100644 --- a/modules/pam_succeed_if/pam_succeed_if.c +++ b/modules/pam_succeed_if/pam_succeed_if.c @@ -56,6 +56,8 @@ #define PAM_SM_AUTH #define PAM_SM_ACCOUNT +#define PAM_SM_SESSION +#define PAM_SM_PASSWORD #include <security/pam_modules.h> #include <security/pam_modutil.h> @@ -503,7 +505,7 @@ PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED, int argc UNUSED, const char **argv UNUSED) { - return PAM_SUCCESS; + return PAM_IGNORE; } PAM_EXTERN int @@ -512,6 +514,24 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv) 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); +} + /* static module data */ #ifdef PAM_STATIC struct pam_module _pam_succeed_if_modstruct = { @@ -519,8 +539,8 @@ struct pam_module _pam_succeed_if_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 |