diff options
author | des <des@FreeBSD.org> | 2001-12-05 16:06:35 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2001-12-05 16:06:35 +0000 |
commit | 354c4b52cca6a669609c3ccbb1328493280b9b2e (patch) | |
tree | 051f7d5a86dd4a881c71404234dcfdb0998d785c /lib/libpam/modules/pam_securetty/pam_securetty.c | |
parent | 00b1257dbacaa0c8e40a2668f39ea4de83711b57 (diff) | |
download | FreeBSD-src-354c4b52cca6a669609c3ccbb1328493280b9b2e.zip FreeBSD-src-354c4b52cca6a669609c3ccbb1328493280b9b2e.tar.gz |
Add dummy functions for all module types. These dummies return PAM_IGNORE
rather than PAM_SUCCESS, so you'll get a failure if you list dummies but
no real modules for a particular module chain.
Sponsored by: DARPA, NAI Labs
Diffstat (limited to 'lib/libpam/modules/pam_securetty/pam_securetty.c')
-rw-r--r-- | lib/libpam/modules/pam_securetty/pam_securetty.c | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/lib/libpam/modules/pam_securetty/pam_securetty.c b/lib/libpam/modules/pam_securetty/pam_securetty.c index 911cda3..f54a70a 100644 --- a/lib/libpam/modules/pam_securetty/pam_securetty.c +++ b/lib/libpam/modules/pam_securetty/pam_securetty.c @@ -1,6 +1,13 @@ /*- * Copyright (c) 2001 Mark R V Murray * All rights reserved. + * Copyright (c) 2001 Networks Associates Technologies, Inc. + * All rights reserved. + * + * Portions of this software were developed for the FreeBSD Project by + * ThinkSec AS and NAI Labs, the Security Research Division of Network + * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 + * ("CBOSS"), as part of the DARPA CHATS research program. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -10,6 +17,9 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote + * products derived from this software without specific prior written + * permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -34,6 +44,10 @@ __FBSDID("$FreeBSD$"); #include <string.h> #define PAM_SM_AUTH +#define PAM_SM_ACCOUNT +#define PAM_SM_SESSION +#define PAM_SM_PASSWORD + #include <security/pam_modules.h> #include <pam_mod_misc.h> @@ -104,4 +118,52 @@ pam_sm_setcred(pam_handle_t * pamh, int flags, int argc, const char **argv) PAM_RETURN(PAM_SUCCESS); } +PAM_EXTERN int +pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc ,const char **argv) +{ + struct options options; + + pam_std_option(&options, NULL, argc, argv); + + PAM_LOG("Options processed"); + + PAM_RETURN(PAM_IGNORE); +} + +PAM_EXTERN int +pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char **argv) +{ + struct options options; + + pam_std_option(&options, NULL, argc, argv); + + PAM_LOG("Options processed"); + + PAM_RETURN(PAM_IGNORE); +} + +PAM_EXTERN int +pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv) +{ + struct options options; + + pam_std_option(&options, NULL, argc, argv); + + PAM_LOG("Options processed"); + + PAM_RETURN(PAM_IGNORE); +} + +PAM_EXTERN int +pam_sm_close_session(pam_handle_t *pamh, int flags, int argc, const char **argv) +{ + struct options options; + + pam_std_option(&options, NULL, argc, argv); + + PAM_LOG("Options processed"); + + PAM_RETURN(PAM_IGNORE); +} + PAM_MODULE_ENTRY("pam_securetty"); |