]> granicus.if.org Git - linux-pam/commitdiff
Remove "--enable-static-modules" option and support from
authorThorsten Kukuk <kukuk@thkukuk.de>
Tue, 29 Mar 2016 12:14:03 +0000 (14:14 +0200)
committerThorsten Kukuk <kukuk@thkukuk.de>
Tue, 29 Mar 2016 12:14:03 +0000 (14:14 +0200)
 Linux-PAM. It was never official supported and was broken since years.

* configure.ac: Remove --enable-static-modules option.
* doc/man/pam_sm_acct_mgmt.3.xml: Remove PAM_EXTERN.
* doc/man/pam_sm_authenticate.3.xml: Likewise.
* doc/man/pam_sm_chauthtok.3.xml: Likewise.
* doc/man/pam_sm_close_session.3.xml: Likewise.
* doc/man/pam_sm_open_session.3.xml: Likewise.
* doc/man/pam_sm_setcred.3.xml: Likewise.
* libpam/Makefile.am: Remove STATIC_MODULES cases.
* libpam/include/security/pam_modules.h: Remove PAM_STATIC parts.
* libpam/pam_dynamic.c: Likewise.
* libpam/pam_handlers.c: Likewise.
* libpam/pam_private.h: Likewise.
* libpam/pam_static.c: Remove file.
* libpam/pam_static_modules.h: Remove header file.
* modules/pam_access/pam_access.c: Remove PAM_EXTERN and PAM_STATIC parts.
* modules/pam_cracklib/pam_cracklib.c: Likewise.
* modules/pam_debug/pam_debug.c: Likewise.
* modules/pam_deny/pam_deny.c: Likewise.
* modules/pam_echo/pam_echo.c: Likewise.
* modules/pam_env/pam_env.c: Likewise.
* modules/pam_exec/pam_exec.c: Likewise.
* modules/pam_faildelay/pam_faildelay.c: Likewise.
* modules/pam_filter/pam_filter.c: Likewise.
* modules/pam_ftp/pam_ftp.c: Likewise.
* modules/pam_group/pam_group.c: Likewise.
* modules/pam_issue/pam_issue.c: Likewise.
* modules/pam_keyinit/pam_keyinit.c: Likewise.
* modules/pam_lastlog/pam_lastlog.c: Likewise.
* modules/pam_limits/pam_limits.c: Likewise.
* modules/pam_listfile/pam_listfile.c: Likewise.
* modules/pam_localuser/pam_localuser.c: Likewise.
* modules/pam_loginuid/pam_loginuid.c: Likewise.
* modules/pam_mail/pam_mail.c: Likewise.
* modules/pam_mkhomedir/pam_mkhomedir.c: Likewise.
* modules/pam_motd/pam_motd.c: Likewise.
* modules/pam_namespace/pam_namespace.c: Likewise.
* modules/pam_nologin/pam_nologin.c: Likewise.
* modules/pam_permit/pam_permit.c: Likewise.
* modules/pam_pwhistory/pam_pwhistory.c: Likewise.
* modules/pam_rhosts/pam_rhosts.c: Likewise.
* modules/pam_rootok/pam_rootok.c: Likewise.
* modules/pam_securetty/pam_securetty.c: Likewise.
* modules/pam_selinux/pam_selinux.c: Likewise.
* modules/pam_sepermit/pam_sepermit.c: Likewise.
* modules/pam_shells/pam_shells.c: Likewise.
* modules/pam_stress/pam_stress.c: Likewise.
* modules/pam_succeed_if/pam_succeed_if.c: Likewise.
* modules/pam_tally/pam_tally.c: Likewise.
* modules/pam_tally2/pam_tally2.c: Likewise.
* modules/pam_time/pam_time.c: Likewise.
* modules/pam_timestamp/pam_timestamp.c: Likewise.
* modules/pam_tty_audit/pam_tty_audit.c: Likewise.
* modules/pam_umask/pam_umask.c: Likewise.
* modules/pam_userdb/pam_userdb.c: Likewise.
* modules/pam_warn/pam_warn.c: Likewise.
* modules/pam_wheel/pam_wheel.c: Likewise.
* modules/pam_xauth/pam_xauth.c: Likewise.
* modules/pam_unix/Makefile.am: Remove STATIC_MODULES part.
* modules/pam_unix/pam_unix_acct.c: Remove PAM_STATIC part.
* modules/pam_unix/pam_unix_auth.c: Likewise.
* modules/pam_unix/pam_unix_passwd.c: Likewise.
* modules/pam_unix/pam_unix_sess.c: Likewise.
* modules/pam_unix/pam_unix_static.c: Removed.
* modules/pam_unix/pam_unix_static.h: Removed.
* po/POTFILES.in: Remove removed files.
* tests/tst-dlopen.c: Remove PAM_STATIC part.

66 files changed:
configure.ac
doc/man/pam_sm_acct_mgmt.3.xml
doc/man/pam_sm_authenticate.3.xml
doc/man/pam_sm_chauthtok.3.xml
doc/man/pam_sm_close_session.3.xml
doc/man/pam_sm_open_session.3.xml
doc/man/pam_sm_setcred.3.xml
libpam/Makefile.am
libpam/include/security/pam_modules.h
libpam/pam_dynamic.c
libpam/pam_handlers.c
libpam/pam_private.h
libpam/pam_static.c [deleted file]
libpam/pam_static_modules.h [deleted file]
modules/pam_access/pam_access.c
modules/pam_cracklib/pam_cracklib.c
modules/pam_debug/pam_debug.c
modules/pam_deny/pam_deny.c
modules/pam_echo/pam_echo.c
modules/pam_env/pam_env.c
modules/pam_exec/pam_exec.c
modules/pam_faildelay/pam_faildelay.c
modules/pam_filter/pam_filter.c
modules/pam_ftp/pam_ftp.c
modules/pam_group/pam_group.c
modules/pam_issue/pam_issue.c
modules/pam_keyinit/pam_keyinit.c
modules/pam_lastlog/pam_lastlog.c
modules/pam_limits/pam_limits.c
modules/pam_listfile/pam_listfile.c
modules/pam_localuser/pam_localuser.c
modules/pam_loginuid/pam_loginuid.c
modules/pam_mail/pam_mail.c
modules/pam_mkhomedir/pam_mkhomedir.c
modules/pam_motd/pam_motd.c
modules/pam_namespace/pam_namespace.c
modules/pam_nologin/pam_nologin.c
modules/pam_permit/pam_permit.c
modules/pam_pwhistory/pam_pwhistory.c
modules/pam_rhosts/pam_rhosts.c
modules/pam_rootok/pam_rootok.c
modules/pam_securetty/pam_securetty.c
modules/pam_selinux/pam_selinux.c
modules/pam_sepermit/pam_sepermit.c
modules/pam_shells/pam_shells.c
modules/pam_stress/pam_stress.c
modules/pam_succeed_if/pam_succeed_if.c
modules/pam_tally/pam_tally.c
modules/pam_tally2/pam_tally2.c
modules/pam_time/pam_time.c
modules/pam_timestamp/pam_timestamp.c
modules/pam_tty_audit/pam_tty_audit.c
modules/pam_umask/pam_umask.c
modules/pam_unix/Makefile.am
modules/pam_unix/pam_unix_acct.c
modules/pam_unix/pam_unix_auth.c
modules/pam_unix/pam_unix_passwd.c
modules/pam_unix/pam_unix_sess.c
modules/pam_unix/pam_unix_static.c [deleted file]
modules/pam_unix/pam_unix_static.h [deleted file]
modules/pam_userdb/pam_userdb.c
modules/pam_warn/pam_warn.c
modules/pam_wheel/pam_wheel.c
modules/pam_xauth/pam_xauth.c
po/POTFILES.in
tests/tst-dlopen.c

index a20c502276356effe3177413749b8320eaf85de4..534194d4d8116691a2235ca4d755c0d1cd5eb612 100644 (file)
@@ -61,23 +61,8 @@ dnl This should be called before any macros that run the C compiler.
 AC_USE_SYSTEM_EXTENSIONS
 
 LT_INIT([disable-static])
-
-dnl
-dnl check if we should link everything static into libpam
-dnl
-AC_ARG_ENABLE(static-modules,AS_HELP_STRING([--enable-static-modules],
-       [do not make the modules dynamically loadable]),
-       STATIC_MODULES=$enableval,STATIC_MODULES=no)
-if test "$STATIC_MODULES" != "no" ; then
-        CFLAGS="$CFLAGS -DPAM_STATIC"
-       AC_ENABLE_STATIC([yes])
-       AC_ENABLE_SHARED([no])
-else
-# per default don't build static libraries
-       AC_ENABLE_STATIC([no])
-       AC_ENABLE_SHARED([yes])
-fi
-AM_CONDITIONAL([STATIC_MODULES], [test "$STATIC_MODULES" != "no"])
+AC_ENABLE_STATIC([no])
+AC_ENABLE_SHARED([yes])
 
 dnl Checks for programs.
 AC_PROG_CC
index 35aa28a8a5355b523473b9ec0037f8d480c0a7e7..ff99867672b5313ce9b8bdcd5280a88f1fbc5a43 100644 (file)
@@ -20,7 +20,7 @@
       <funcsynopsisinfo>#define PAM_SM_ACCOUNT</funcsynopsisinfo>
       <funcsynopsisinfo>#include &lt;security/pam_modules.h&gt;</funcsynopsisinfo>
       <funcprototype>
-        <funcdef>PAM_EXTERN int <function>pam_sm_acct_mgmt</function></funcdef>
+        <funcdef>int <function>pam_sm_acct_mgmt</function></funcdef>
         <paramdef>pam_handle_t *<parameter>pamh</parameter></paramdef>
         <paramdef>int <parameter>flags</parameter></paramdef>
         <paramdef>int <parameter>argc</parameter></paramdef>
index 9121aed210d7da94f202ac543fd5e86f21fd301a..42997265026998f62e86e3a98876e85945480668 100644 (file)
@@ -20,7 +20,7 @@
       <funcsynopsisinfo>#define PAM_SM_AUTH</funcsynopsisinfo>
       <funcsynopsisinfo>#include &lt;security/pam_modules.h&gt;</funcsynopsisinfo>
       <funcprototype>
-        <funcdef>PAM_EXTERN int <function>pam_sm_authenticate</function></funcdef>
+        <funcdef>int <function>pam_sm_authenticate</function></funcdef>
         <paramdef>pam_handle_t *<parameter>pamh</parameter></paramdef>
         <paramdef>int <parameter>flags</parameter></paramdef>
         <paramdef>int <parameter>argc</parameter></paramdef>
index d6d3093cc258e26df56b98b02780740c326296ca..d8f36d694d0e4dcb6450182fde6967a7733ee6dc 100644 (file)
@@ -20,7 +20,7 @@
       <funcsynopsisinfo>#define PAM_SM_PASSWORD</funcsynopsisinfo>
       <funcsynopsisinfo>#include &lt;security/pam_modules.h&gt;</funcsynopsisinfo>
       <funcprototype>
-        <funcdef>PAM_EXTERN int <function>pam_sm_chauthtok</function></funcdef>
+        <funcdef>int <function>pam_sm_chauthtok</function></funcdef>
         <paramdef>pam_handle_t *<parameter>pamh</parameter></paramdef>
         <paramdef>int <parameter>flags</parameter></paramdef>
         <paramdef>int <parameter>argc</parameter></paramdef>
index f2e67185e8c400a1326976605a596e2c175e2a02..db579ffaa5f5dfe471649533d3a310f9fa64d73e 100644 (file)
@@ -20,7 +20,7 @@
       <funcsynopsisinfo>#define PAM_SM_SESSION</funcsynopsisinfo>
       <funcsynopsisinfo>#include &lt;security/pam_modules.h&gt;</funcsynopsisinfo>
       <funcprototype>
-        <funcdef>PAM_EXTERN int <function>pam_sm_close_session</function></funcdef>
+        <funcdef>int <function>pam_sm_close_session</function></funcdef>
         <paramdef>pam_handle_t *<parameter>pamh</parameter></paramdef>
         <paramdef>int <parameter>flags</parameter></paramdef>
         <paramdef>int <parameter>argc</parameter></paramdef>
index 0851c345db9866ee2bd0df0d89f06178b6b16fb9..0c9ec77fb3e2ae3b4c4ab20267c8ba18d64ec045 100644 (file)
@@ -20,7 +20,7 @@
       <funcsynopsisinfo>#define PAM_SM_SESSION</funcsynopsisinfo>
       <funcsynopsisinfo>#include &lt;security/pam_modules.h&gt;</funcsynopsisinfo>
       <funcprototype>
-        <funcdef>PAM_EXTERN int <function>pam_sm_open_session</function></funcdef>
+        <funcdef>int <function>pam_sm_open_session</function></funcdef>
         <paramdef>pam_handle_t *<parameter>pamh</parameter></paramdef>
         <paramdef>int <parameter>flags</parameter></paramdef>
         <paramdef>int <parameter>argc</parameter></paramdef>
index e557000cd2cc50bbfff5081decc5e1358e44ba6c..5cfe899fcfcd27310683ae35203582e106ce4570 100644 (file)
@@ -20,7 +20,7 @@
       <funcsynopsisinfo>#define PAM_SM_AUTH</funcsynopsisinfo>
       <funcsynopsisinfo>#include &lt;security/pam_modules.h&gt;</funcsynopsisinfo>
       <funcprototype>
-        <funcdef>PAM_EXTERN int <function>pam_sm_setcred</function></funcdef>
+        <funcdef>int <function>pam_sm_setcred</function></funcdef>
         <paramdef>pam_handle_t *<parameter>pamh</parameter></paramdef>
         <paramdef>int <parameter>flags</parameter></paramdef>
         <paramdef>int <parameter>argc</parameter></paramdef>
index ac2a1fbf1af3c96d3e52dd6dafa0b1cce48cf1bb..04a8df0fec67a7b1cb3ecfc7141e0dda57176925 100644 (file)
@@ -18,16 +18,11 @@ include_HEADERS = include/security/_pam_compat.h \
        include/security/pam_ext.h include/security/pam_modutil.h
 
 noinst_HEADERS = pam_prelude.h pam_private.h pam_tokens.h \
-               pam_modutil_private.h pam_static_modules.h
+               pam_modutil_private.h
 
 libpam_la_LDFLAGS = -no-undefined -version-info 84:1:84
 libpam_la_LIBADD = @LIBAUDIT@ $(LIBPRELUDE_LIBS) @LIBDL@
 
-if STATIC_MODULES
-  libpam_la_LIBADD += $(shell ls ../modules/pam_*/*.lo) \
-       @LIBDB@ @LIBCRYPT@ $(NIS_LIBS) @LIBCRACK@ -lutil
-  AM_CFLAGS += $(NIS_CFLAGS)
-endif
 if HAVE_VERSIONING
   libpam_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libpam.map
 endif
@@ -38,7 +33,7 @@ libpam_la_SOURCES = pam_account.c pam_auth.c pam_data.c pam_delay.c \
        pam_dispatch.c pam_end.c pam_env.c pam_get_authtok.c \
        pam_handlers.c pam_item.c \
        pam_misc.c pam_password.c pam_prelude.c \
-       pam_session.c pam_start.c pam_static.c pam_strerror.c \
+       pam_session.c pam_start.c pam_strerror.c \
        pam_vprompt.c pam_syslog.c pam_dynamic.c pam_audit.c \
        pam_modutil_cleanup.c pam_modutil_getpwnam.c pam_modutil_ioloop.c \
        pam_modutil_getgrgid.c pam_modutil_getpwuid.c pam_modutil_getgrnam.c \
index 5c516c4e547a58347198c46b494c8a2d6774c5ae..37568e996a2095116c39cc5d6b98b3b910a3c2bc 100644 (file)
@@ -30,80 +30,26 @@ pam_get_data(const pam_handle_t *pamh, const char *module_data_name,
 extern int PAM_NONNULL((1,2))
 pam_get_user(pam_handle_t *pamh, const char **user, const char *prompt);
 
-#ifdef PAM_STATIC
-
-#define PAM_EXTERN static
-
-struct pam_module {
-    const char *name;          /* Name of the module */
-
-    /* These are function pointers to the module's key functions.  */
-
-    int (*pam_sm_authenticate)(pam_handle_t *pamh, int flags,
-                              int argc, const char **argv);
-    int (*pam_sm_setcred)(pam_handle_t *pamh, int flags,
-                         int argc, const char **argv);
-    int (*pam_sm_acct_mgmt)(pam_handle_t *pamh, int flags,
-                           int argc, const char **argv);
-    int (*pam_sm_open_session)(pam_handle_t *pamh, int flags,
-                              int argc, const char **argv);
-    int (*pam_sm_close_session)(pam_handle_t *pamh, int flags,
-                               int argc, const char **argv);
-    int (*pam_sm_chauthtok)(pam_handle_t *pamh, int flags,
-                           int argc, const char **argv);
-};
-
-#else /* !PAM_STATIC */
-
-#define PAM_EXTERN extern
-
-#endif /* PAM_STATIC */
-
-/* Lots of files include pam_modules.h that don't need these
- * declared.  However, when they are declared static, they
- * need to be defined later.  So we have to protect C files
- * that include these without wanting these functions defined.. */
-
-#if (defined(PAM_STATIC) && defined(PAM_SM_AUTH)) || !defined(PAM_STATIC)
-
 /* Authentication API's */
-PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags,
-                                   int argc, const char **argv);
-PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh, int flags,
-                             int argc, const char **argv);
-
-#endif /*(defined(PAM_STATIC) && defined(PAM_SM_AUTH))
-        || !defined(PAM_STATIC)*/
-
-#if (defined(PAM_STATIC) && defined(PAM_SM_ACCOUNT)) || !defined(PAM_STATIC)
+int pam_sm_authenticate(pam_handle_t *pamh, int flags,
+                        int argc, const char **argv);
+int pam_sm_setcred(pam_handle_t *pamh, int flags,
+                  int argc, const char **argv);
 
 /* Account Management API's */
-PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
-                               int argc, const char **argv);
-
-#endif /*(defined(PAM_STATIC) && defined(PAM_SM_ACCOUNT))
-        || !defined(PAM_STATIC)*/
-
-#if (defined(PAM_STATIC) && defined(PAM_SM_SESSION)) || !defined(PAM_STATIC)
+int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
+                    int argc, const char **argv);
 
 /* Session Management API's */
-PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags,
-                                  int argc, const char **argv);
-
-PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags,
-                                   int argc, const char **argv);
+int pam_sm_open_session(pam_handle_t *pamh, int flags,
+                       int argc, const char **argv);
 
-#endif /*(defined(PAM_STATIC) && defined(PAM_SM_SESSION))
-        || !defined(PAM_STATIC)*/
-
-#if (defined(PAM_STATIC) && defined(PAM_SM_PASSWORD)) || !defined(PAM_STATIC)
+int pam_sm_close_session(pam_handle_t *pamh, int flags,
+                        int argc, const char **argv);
 
 /* Password Management API's */
-PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
-                               int argc, const char **argv);
-
-#endif /*(defined(PAM_STATIC) && defined(PAM_SM_PASSWORD))
-        || !defined(PAM_STATIC)*/
+int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
+                    int argc, const char **argv);
 
 /* The following two flags are for use across the Linux-PAM/module
  * interface only. The Application is not permitted to use these
index e1155e50cd37dbe3d9d87b2717dc1358bbf2f506..50bfd792b7cb8ca9c3fdcd008bde45b588afa03e 100644 (file)
@@ -33,8 +33,6 @@
 
 #include "pam_private.h"
 
-#ifndef PAM_STATIC
-
 #ifdef PAM_SHL
 # include <dl.h>
 #elif defined(PAM_DYLD)
@@ -139,4 +137,3 @@ _pam_dlerror (void)
 #endif
 }
 
-#endif
index bc3fd9d81710dc2e7ab01e00d8449dca3fd62d85..91cccadcc22aae7a1f44d58930e4c3ecbe354a1a 100644 (file)
@@ -665,9 +665,7 @@ _pam_load_module(pam_handle_t *pamh, const char *mod_path, int handler_type)
 {
     int x = 0;
     int success;
-#ifndef PAM_STATIC
     char *mod_full_isa_path=NULL, *isa=NULL;
-#endif
     struct loaded_module *mod;
 
     D(("_pam_load_module: loading module `%s'", mod_path));
@@ -701,27 +699,6 @@ _pam_load_module(pam_handle_t *pamh, const char *mod_path, int handler_type)
        /* Be pessimistic... */
        success = PAM_ABORT;
 
-#ifdef PAM_STATIC
-       /* Only load static function if function was not found dynamically.
-        * This code should work even if no dynamic loading is available. */
-       if (success != PAM_SUCCESS) {
-           D(("_pam_load_module: open static handler %s", mod_path));
-           mod->dl_handle = _pam_open_static_handler(pamh, mod_path);
-           if (mod->dl_handle == NULL) {
-               D(("_pam_load_module: unable to find static handler %s",
-                  mod_path));
-               if (handler_type != PAM_HT_SILENT_MODULE)
-                   pam_syslog(pamh, LOG_ERR,
-                               "unable to open static handler %s", mod_path);
-               /* Didn't find module in dynamic or static..will mark bad */
-           } else {
-               D(("static module added successfully"));
-               success = PAM_SUCCESS;
-               mod->type = PAM_MT_STATIC_MOD;
-               pamh->handlers.modules_used++;
-           }
-       }
-#else
        D(("_pam_load_module: _pam_dlopen(%s)", mod_path));
        mod->dl_handle = _pam_dlopen(mod_path);
        D(("_pam_load_module: _pam_dlopen'ed"));
@@ -758,7 +735,6 @@ _pam_load_module(pam_handle_t *pamh, const char *mod_path, int handler_type)
            mod->type = PAM_MT_DYNAMIC_MOD;
            pamh->handlers.modules_used++;
        }
-#endif
 
        if (success != PAM_SUCCESS) {            /* add a malformed module */
            mod->dl_handle = NULL;
@@ -869,16 +845,8 @@ int _pam_add_handler(pam_handle_t *pamh
     }
 
     /* are the modules reliable? */
-    if (
-#ifdef PAM_STATIC
-        mod_type != PAM_MT_STATIC_MOD
-        &&
-#else
-        mod_type != PAM_MT_DYNAMIC_MOD
-        &&
-#endif
-        mod_type != PAM_MT_FAULTY_MOD
-       ) {
+    if (mod_type != PAM_MT_DYNAMIC_MOD &&
+        mod_type != PAM_MT_FAULTY_MOD) {
        D(("_pam_add_handlers: illegal module library type; %d", mod_type));
        pam_syslog(pamh, LOG_ERR,
                        "internal error: module library type not known: %s;%d",
@@ -888,30 +856,15 @@ int _pam_add_handler(pam_handle_t *pamh
 
     /* now identify this module's functions - for non-faulty modules */
 
-#ifdef PAM_STATIC
-    if ((mod_type == PAM_MT_STATIC_MOD) &&
-        (func = (servicefn)_pam_get_static_sym(mod->dl_handle, sym)) == NULL) {
-       pam_syslog(pamh, LOG_ERR, "unable to resolve static symbol: %s", sym);
-    }
-#else
     if ((mod_type == PAM_MT_DYNAMIC_MOD) &&
         !(func = _pam_dlsym(mod->dl_handle, sym)) ) {
        pam_syslog(pamh, LOG_ERR, "unable to resolve symbol: %s", sym);
     }
-#endif
     if (sym2) {
-#ifdef PAM_STATIC
-       if ((mod_type == PAM_MT_STATIC_MOD) &&
-           (func2 = (servicefn)_pam_get_static_sym(mod->dl_handle, sym2))
-           == NULL) {
-           pam_syslog(pamh, LOG_ERR, "unable to resolve symbol: %s", sym2);
-       }
-#else
        if ((mod_type == PAM_MT_DYNAMIC_MOD) &&
            !(func2 = _pam_dlsym(mod->dl_handle, sym2)) ) {
            pam_syslog(pamh, LOG_ERR, "unable to resolve symbol: %s", sym2);
        }
-#endif
     }
 
     /* here func (and perhaps func2) point to the appropriate functions */
@@ -994,11 +947,9 @@ int _pam_free_handlers(pam_handle_t *pamh)
     while (pamh->handlers.modules_used) {
        D(("_pam_free_handlers: dlclose(%s)", mod->name));
        free(mod->name);
-#ifndef PAM_STATIC
        if (mod->type == PAM_MT_DYNAMIC_MOD) {
            _pam_dlclose(mod->dl_handle);
        }
-#endif
        mod++;
        pamh->handlers.modules_used--;
     }
index 113827740a58403c852b22dddd3fe2687d983108..7ff9f758def9a6d12f43b1a497fdd87a11fd3ed8 100644 (file)
@@ -241,22 +241,10 @@ void _pam_await_timer(pam_handle_t *pamh, int status);
 typedef void (*voidfunc(void))(void);
 typedef int (*servicefn)(pam_handle_t *, int, int, char **);
 
-#ifdef PAM_STATIC
-/* The next two in ../modules/_pam_static/pam_static.c */
-
-/* Return pointer to data structure used to define a static module */
-struct pam_module * _pam_open_static_handler (pam_handle_t *pamh,
-                                             const char *path);
-
-/* Return pointer to function requested from static module */
-
-voidfunc *_pam_get_static_sym(struct pam_module *mod, const char *symname);
-#else
 void *_pam_dlopen (const char *mod_path);
 servicefn _pam_dlsym (void *handle, const char *symbol);
 void _pam_dlclose (void *handle);
 const char *_pam_dlerror (void);
-#endif
 
 /* For now we just use a stack and linear search for module data. */
 /* If it becomes apparent that there is a lot of data, it should  */
diff --git a/libpam/pam_static.c b/libpam/pam_static.c
deleted file mode 100644 (file)
index 511026d..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * pam_static.c -- static module loading helper functions
- *
- * created by Michael K. Johnson, johnsonm@redhat.com
- */
-
-/* This whole file is only used for PAM_STATIC */
-
-#ifdef PAM_STATIC
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "pam_private.h"
-
-#include "pam_static_modules.h"
-
-/*
- * and now for the functions
- */
-
-/* Return pointer to data structure used to define a static module */
-struct pam_module *
-_pam_open_static_handler (pam_handle_t *pamh, const char *path)
-{
-    int i;
-    const char *clpath = path;
-    char *lpath, *end;
-
-    if (strchr(clpath, '/')) {
-        /* ignore path and leading "/" */
-       clpath = strrchr(path, '/') + 1;
-    }
-    /* create copy to muck with (must free before return) */
-    lpath = _pam_strdup(clpath);
-    /* chop .so off copy if it exists (or other extension on other
-       platform...) */
-    end = strstr(lpath, ".so");
-    if (end) {
-        *end = '\0';
-    }
-
-    /* now go find the module */
-    for (i = 0; static_modules[i] != NULL; i++) {
-       D(("%s=?%s\n", lpath, static_modules[i]->name));
-        if (static_modules[i]->name &&
-           ! strcmp(static_modules[i]->name, lpath)) {
-           break;
-       }
-    }
-
-    if (static_modules[i] == NULL) {
-      pam_syslog (pamh, LOG_ERR, "no static module named %s", lpath);
-    }
-
-    free(lpath);
-    return (static_modules[i]);
-}
-
-/* Return pointer to function requested from static module
- * Can't just return void *, because ANSI C disallows casting a
- * pointer to a function to a void *...
- * This definition means:
- * _pam_get_static_sym is a function taking two arguments and
- * returning a pointer to a function which takes no arguments
- * and returns void... */
-voidfunc *_pam_get_static_sym(struct pam_module *mod, const char *symname) {
-
-    if (! strcmp(symname, "pam_sm_authenticate")) {
-        return ((voidfunc *)mod->pam_sm_authenticate);
-    } else if (! strcmp(symname, "pam_sm_setcred")) {
-        return ((voidfunc *)mod->pam_sm_setcred);
-    } else if (! strcmp(symname, "pam_sm_acct_mgmt")) {
-        return ((voidfunc *)mod->pam_sm_acct_mgmt);
-    } else if (! strcmp(symname, "pam_sm_open_session")) {
-        return ((voidfunc *)mod->pam_sm_open_session);
-    } else if (! strcmp(symname, "pam_sm_close_session")) {
-        return ((voidfunc *)mod->pam_sm_close_session);
-    } else if (! strcmp(symname, "pam_sm_chauthtok")) {
-        return ((voidfunc *)mod->pam_sm_chauthtok);
-    }
-    /* getting to this point is an error */
-    return ((voidfunc *)NULL);
-}
-
-#else /* ! PAM_STATIC */
-
-typedef int blarg;
-
-#endif /* ! PAM_STATIC */
-
-/*
- * Copyright (C) 1995 by Red Hat Software, Michael K. Johnson
- * All rights reserved
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, and the entire permission notice in its entirety,
- *    including the disclaimer of warranties.
- * 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.
- *
- * ALTERNATIVELY, this product may be distributed under the terms of
- * the GNU Public License, in which case the provisions of the GPL are
- * required INSTEAD OF the above restrictions.  (This clause is
- * necessary due to a potential bad interaction between the GPL and
- * the restrictions contained in a BSD-style copyright.)
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
diff --git a/libpam/pam_static_modules.h b/libpam/pam_static_modules.h
deleted file mode 100644 (file)
index 698989b..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, and the entire permission notice in its entirety,
- *    including the disclaimer of warranties.
- * 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.
- *
- * ALTERNATIVELY, this product may be distributed under the terms of
- * the GNU Public License, in which case the provisions of the GPL are
- * required INSTEAD OF the above restrictions.  (This clause is
- * necessary due to a potential bad interaction between the GPL and
- * the restrictions contained in a BSD-style copyright.)
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* Pointers to static module data.  */
-
-extern struct pam_module _pam_access_modstruct;
-extern struct pam_module _pam_cracklib_modstruct;
-extern struct pam_module _pam_debug_modstruct;
-extern struct pam_module _pam_deny_modstruct;
-extern struct pam_module _pam_echo_modstruct;
-extern struct pam_module _pam_env_modstruct;
-extern struct pam_module _pam_exec_modstruct;
-extern struct pam_module _pam_faildelay_modstruct;
-extern struct pam_module _pam_filter_modstruct;
-extern struct pam_module _pam_ftp_modstruct;
-extern struct pam_module _pam_group_modstruct;
-extern struct pam_module _pam_issue_modstruct;
-#ifdef HAVE_KEY_MANAGEMENT
-extern struct pam_module _pam_keyinit_modstruct;
-#endif
-extern struct pam_module _pam_lastlog_modstruct;
-extern struct pam_module _pam_limits_modstruct;
-extern struct pam_module _pam_listfile_modstruct;
-extern struct pam_module _pam_localuser_modstruct;
-extern struct pam_module _pam_loginuid_modstruct;
-extern struct pam_module _pam_mail_modstruct;
-extern struct pam_module _pam_mkhomedir_modstruct;
-extern struct pam_module _pam_motd_modstruct;
-#ifdef HAVE_UNSHARE
-extern struct pam_module _pam_namespace_modstruct;
-#endif
-extern struct pam_module _pam_nologin_modstruct;
-extern struct pam_module _pam_permit_modstruct;
-extern struct pam_module _pam_pwhistory_modstruct;
-extern struct pam_module _pam_rhosts_modstruct;
-extern struct pam_module _pam_rootok_modstruct;
-extern struct pam_module _pam_securetty_modstruct;
-#ifdef WITH_SELINUX
-extern struct pam_module _pam_selinux_modstruct;
-extern struct pam_module _pam_sepermit_modstruct;
-#endif
-extern struct pam_module _pam_shells_modstruct;
-extern struct pam_module _pam_stress_modstruct;
-extern struct pam_module _pam_succeed_if_modstruct;
-extern struct pam_module _pam_tally_modstruct;
-extern struct pam_module _pam_tally2_modstruct;
-extern struct pam_module _pam_time_modstruct;
-extern struct pam_module _pam_timestamp_modstruct;
-#ifdef HAVE_AUDIT_TTY_STATUS
-extern struct pam_module _pam_tty_audit_modstruct;
-#endif
-extern struct pam_module _pam_umask_modstruct;
-extern struct pam_module _pam_unix_modstruct;
-extern struct pam_module _pam_userdb_modstruct;
-extern struct pam_module _pam_warn_modstruct;
-extern struct pam_module _pam_wheel_modstruct;
-extern struct pam_module _pam_xauth_modstruct;
-
-/* and here is a structure that connects libpam to the above static
-   modules.  */
-
-static struct pam_module *static_modules[] = {
-  &_pam_access_modstruct,
-#ifdef HAVE_LIBCRACK
-  &_pam_cracklib_modstruct,
-#endif
-  &_pam_debug_modstruct,
-  &_pam_deny_modstruct,
-  &_pam_echo_modstruct,
-  &_pam_env_modstruct,
-  &_pam_exec_modstruct,
-  &_pam_faildelay_modstruct,
-  &_pam_filter_modstruct,
-  &_pam_ftp_modstruct,
-  &_pam_group_modstruct,
-  &_pam_issue_modstruct,
-#ifdef HAVE_KEY_MANAGEMENT
-  &_pam_keyinit_modstruct,
-#endif
-  &_pam_lastlog_modstruct,
-  &_pam_limits_modstruct,
-  &_pam_listfile_modstruct,
-  &_pam_localuser_modstruct,
-  &_pam_loginuid_modstruct,
-  &_pam_mail_modstruct,
-  &_pam_mkhomedir_modstruct,
-  &_pam_motd_modstruct,
-#ifdef HAVE_UNSHARE
-  &_pam_namespace_modstruct,
-#endif
-  &_pam_nologin_modstruct,
-  &_pam_permit_modstruct,
-  &_pam_pwhistory_modstruct,
-  &_pam_rhosts_modstruct,
-  &_pam_rootok_modstruct,
-  &_pam_securetty_modstruct,
-#ifdef WITH_SELINUX
-  &_pam_selinux_modstruct,
-  &_pam_sepermit_modstruct,
-#endif
-  &_pam_shells_modstruct,
-  &_pam_stress_modstruct,
-  &_pam_succeed_if_modstruct,
-  &_pam_tally_modstruct,
-  &_pam_tally2_modstruct,
-  &_pam_time_modstruct,
-  &_pam_timestamp_modstruct,
-#ifdef HAVE_AUDIT_TTY_STATUS
-  &_pam_tty_audit_modstruct,
-#endif
-  &_pam_umask_modstruct,
-  &_pam_unix_modstruct,
-  &_pam_userdb_modstruct,
-  &_pam_warn_modstruct,
-  &_pam_wheel_modstruct,
-  &_pam_xauth_modstruct,
-  NULL
-};
index d4c847a0a75de24062c129edc4ea3772759b2e63..3ac1ad00b86e58c4694b21495fe0bbeebedd092d 100644 (file)
@@ -792,7 +792,7 @@ network_netmask_match (pam_handle_t *pamh,
 
 /* --- public PAM management functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -904,35 +904,35 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
     }
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
                int argc UNUSED, const char **argv UNUSED)
 {
   return PAM_IGNORE;
 }
 
-PAM_EXTERN int
+int
 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
+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
+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
+int
 pam_sm_chauthtok(pam_handle_t *pamh, int flags,
                 int argc, const char **argv)
 {
@@ -940,18 +940,3 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags,
 }
 
 /* end of module definition */
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_access_modstruct = {
-    "pam_access",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    pam_sm_acct_mgmt,
-    pam_sm_open_session,
-    pam_sm_close_session,
-    pam_sm_chauthtok
-};
-#endif
index 5eefd0babbdccad287a5495330dd68e07c60b6ed..165493194e3e7e0e131699aeb4adb5a31ee75ed6 100644 (file)
@@ -728,8 +728,8 @@ static int _pam_unix_approve_pass(pam_handle_t *pamh,
 /* The Main Thing (by Cristian Gafton, CEO at this module :-)
  * (stolen from http://home.netscape.com)
  */
-PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
-                               int argc, const char **argv)
+int
+pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char **argv)
 {
     unsigned int ctrl;
     struct cracklib_options options;
@@ -858,19 +858,6 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
 
 
 
-#ifdef PAM_STATIC
-/* static module data */
-struct pam_module _pam_cracklib_modstruct = {
-     "pam_cracklib",
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-     pam_sm_chauthtok
-};
-#endif
-
 /*
  * Copyright (c) Cristian Gafton <gafton@redhat.com>, 1996.
  *                                              All rights reserved
index a65d1bf21f5635bbeee0501d72d35a1f50e6179e..9b68d382da784fe3f503b1bb3fc8d9a8c2381a35 100644 (file)
@@ -75,7 +75,6 @@ static int parse_args(int retval, const char *event,
     return retval;
 }
 
-PAM_EXTERN
 int pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
                        int argc, const char **argv)
 {
@@ -103,7 +102,6 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
     return retval;
 }
 
-PAM_EXTERN
 int pam_sm_setcred(pam_handle_t *pamh, int flags UNUSED,
                   int argc, const char **argv)
 {
@@ -112,7 +110,6 @@ int pam_sm_setcred(pam_handle_t *pamh, int flags UNUSED,
 
 /* --- account management functions --- */
 
-PAM_EXTERN
 int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -121,7 +118,6 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
 
 /* --- password management --- */
 
-PAM_EXTERN
 int pam_sm_chauthtok(pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -134,14 +130,12 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags UNUSED,
 
 /* --- session management --- */
 
-PAM_EXTERN
 int pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
                        int argc, const char **argv)
 {
     return parse_args(PAM_SUCCESS, "open_session", pamh, argc, argv);
 }
 
-PAM_EXTERN
 int pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
                         int argc, const char **argv)
 {
@@ -149,19 +143,3 @@ int pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
 }
 
 /* end of module definition */
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_debug_modstruct = {
-    "pam_debug",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    pam_sm_acct_mgmt,
-    pam_sm_open_session,
-    pam_sm_close_session,
-    pam_sm_chauthtok
-};
-
-#endif
index 544c5bdb1231b6cb1334edea58396e4d71cc4ec3..155a1f5d82aaf200f5aeca1456e3f556690fe31f 100644 (file)
 
 /* --- authentication management functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate(pam_handle_t *pamh UNUSED, int flags UNUSED,
                    int argc UNUSED, const char **argv UNUSED)
 {
      return PAM_AUTH_ERR;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED,
               int argc UNUSED, const char **argv UNUSED)
 {
@@ -41,7 +41,7 @@ pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED,
 
 /* --- account management functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt(pam_handle_t *pamh UNUSED, int flags UNUSED,
                 int argc UNUSED, const char **argv UNUSED)
 {
@@ -50,7 +50,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh UNUSED, int flags UNUSED,
 
 /* --- password management --- */
 
-PAM_EXTERN int
+int
 pam_sm_chauthtok(pam_handle_t *pamh UNUSED, int flags UNUSED,
                 int argc UNUSED, const char **argv UNUSED)
 {
@@ -59,14 +59,14 @@ pam_sm_chauthtok(pam_handle_t *pamh UNUSED, int flags UNUSED,
 
 /* --- session management --- */
 
-PAM_EXTERN int
+int
 pam_sm_open_session(pam_handle_t *pamh UNUSED, int flags UNUSED,
                    int argc UNUSED, const char **argv UNUSED)
 {
     return PAM_SESSION_ERR;
 }
 
-PAM_EXTERN int
+int
 pam_sm_close_session(pam_handle_t *pamh UNUSED, int flags UNUSED,
                     int argc UNUSED, const char **argv UNUSED)
 {
@@ -74,16 +74,3 @@ pam_sm_close_session(pam_handle_t *pamh UNUSED, int flags UNUSED,
 }
 
 /* end of module definition */
-
-/* static module data */
-#ifdef PAM_STATIC
-struct pam_module _pam_deny_modstruct = {
-    "pam_deny",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    pam_sm_acct_mgmt,
-    pam_sm_open_session,
-    pam_sm_close_session,
-    pam_sm_chauthtok
-};
-#endif
index d0879fbfe980645ebe302c8fc2de6402334d1883..860ff0af7a7feca9ffa0863ff69b4802a6fb06f2 100644 (file)
@@ -262,18 +262,3 @@ pam_sm_chauthtok (pam_handle_t *pamh, int flags, int argc,
     return PAM_IGNORE;
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_echo_modstruct = {
-  "pam_echo",
-  pam_sm_authenticate,
-  pam_sm_setcred,
-  pam_sm_acct_mgmt,
-  pam_sm_open_session,
-  pam_sm_close_session,
-  pam_sm_chauthtok,
-};
-
-#endif
index 1bfdf0894c527301940141651757b6d09410d455..0b8002f8a483f0735e8457ed6a7bc9bd96a44049 100644 (file)
@@ -768,7 +768,7 @@ static void   _clean_var(VAR *var)
 
 /* --- authentication management functions (only) --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh UNUSED, int flags UNUSED,
                     int argc UNUSED, const char **argv UNUSED)
 {
@@ -839,7 +839,7 @@ handle_env (pam_handle_t *pamh, int argc, const char **argv)
   return retval;
 }
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt (pam_handle_t *pamh UNUSED, int flags UNUSED,
                  int argc UNUSED, const char **argv UNUSED)
 {
@@ -847,7 +847,7 @@ pam_sm_acct_mgmt (pam_handle_t *pamh UNUSED, int flags UNUSED,
   return PAM_SERVICE_ERR;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh, int flags UNUSED,
                int argc, const char **argv)
 {
@@ -855,7 +855,7 @@ pam_sm_setcred (pam_handle_t *pamh, int flags UNUSED,
   return handle_env (pamh, argc, argv);
 }
 
-PAM_EXTERN int
+int
 pam_sm_open_session (pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -863,7 +863,7 @@ pam_sm_open_session (pam_handle_t *pamh, int flags UNUSED,
   return handle_env (pamh, argc, argv);
 }
 
-PAM_EXTERN int
+int
 pam_sm_close_session (pam_handle_t *pamh UNUSED, int flags UNUSED,
                      int argc UNUSED, const char **argv UNUSED)
 {
@@ -871,7 +871,7 @@ pam_sm_close_session (pam_handle_t *pamh UNUSED, int flags UNUSED,
   return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 pam_sm_chauthtok (pam_handle_t *pamh UNUSED, int flags UNUSED,
                  int argc UNUSED, const char **argv UNUSED)
 {
@@ -879,20 +879,4 @@ pam_sm_chauthtok (pam_handle_t *pamh UNUSED, int flags UNUSED,
   return PAM_SERVICE_ERR;
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_env_modstruct = {
-     "pam_env",
-     pam_sm_authenticate,
-     pam_sm_setcred,
-     pam_sm_acct_mgmt,
-     pam_sm_open_session,
-     pam_sm_close_session,
-     pam_sm_chauthtok,
-};
-
-#endif
-
 /* end of module definition */
index 17ba6ca2495a1572aabefd22f9647354c9833796..0ab654893f9cb1ae19887334cfd10975ce211968 100644 (file)
@@ -467,14 +467,14 @@ call_exec (const char *pam_type, pam_handle_t *pamh,
   return PAM_SYSTEM_ERR; /* will never be reached. */
 }
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
   return call_exec ("auth", pamh, argc, argv);
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
                int argc UNUSED, const char **argv UNUSED)
 {
@@ -483,7 +483,7 @@ pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
 
 /* password updating functions */
 
-PAM_EXTERN int
+int
 pam_sm_chauthtok(pam_handle_t *pamh, int flags,
                 int argc, const char **argv)
 {
@@ -492,35 +492,23 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags,
   return call_exec ("password", pamh, argc, argv);
 }
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
                 int argc, const char **argv)
 {
   return call_exec ("account", pamh, argc, argv);
 }
 
-PAM_EXTERN int
+int
 pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
                    int argc, const char **argv)
 {
   return call_exec ("open_session", pamh, argc, argv);
 }
 
-PAM_EXTERN int
+int
 pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
   return call_exec ("close_session", pamh, argc, argv);
 }
-
-#ifdef PAM_STATIC
-struct pam_module _pam_exec_modstruct = {
-  "pam_exec",
-  pam_sm_authenticate,
-  pam_sm_setcred,
-  pam_sm_acct_mgmt,
-  pam_sm_open_session,
-  pam_sm_close_session,
-  pam_sm_chauthtok,
-};
-#endif
index 072b7dd338e0e0d35deb8cdcd9cbe4bd67b48042..7ea8f83777ee79be9878d29f9ca3f42441fed490 100644 (file)
@@ -152,7 +152,6 @@ search_key (const char *filename)
 
 /* --- authentication management functions (only) --- */
 
-PAM_EXTERN
 int pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
                        int argc, const char **argv)
 {
@@ -204,28 +203,10 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
       return i;
 }
 
-PAM_EXTERN
 int pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED,
                   int argc UNUSED, const char **argv UNUSED)
 {
     return PAM_IGNORE;
 }
 
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_faildelay_modstruct = {
-    "pam_faildelay",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    NULL,
-    NULL,
-    NULL,
-    NULL,
-};
-
-#endif
-
 /* end of module definition */
index 9935d9949b83bc1f96ff41c1bf016907dd152978..6e6a0cf77a2ee56c70d21e438ede08323cc56f3c 100644 (file)
@@ -663,23 +663,23 @@ static int need_a_filter(pam_handle_t *pamh
 
 /* ------------------ authentication ----------------- */
 
-PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh
-                                  , int flags, int argc, const char **argv)
+int pam_sm_authenticate(pam_handle_t *pamh,
+                       int flags, int argc, const char **argv)
 {
     return need_a_filter(pamh, flags, argc, argv
                         , "authenticate", FILTER_RUN1);
 }
 
-PAM_EXTERN int pam_sm_setcred(pam_handle_t *pamh, int flags
-                             , int argc, const char **argv)
+int pam_sm_setcred(pam_handle_t *pamh, int flags,
+                  int argc, const char **argv)
 {
     return need_a_filter(pamh, flags, argc, argv, "setcred", FILTER_RUN2);
 }
 
 /* --------------- account management ---------------- */
 
-PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc,
-                              const char **argv)
+int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc,
+                     const char **argv)
 {
     return need_a_filter(pamh, flags, argc, argv
                         , "setcred", FILTER_RUN1|FILTER_RUN2 );
@@ -687,15 +687,15 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc,
 
 /* --------------- session management ---------------- */
 
-PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags
-                                  , int argc, const char **argv)
+int pam_sm_open_session(pam_handle_t *pamh, int flags,
+                       int argc, const char **argv)
 {
     return need_a_filter(pamh, flags, argc, argv
                         , "open_session", FILTER_RUN1);
 }
 
-PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags
-                             , int argc, const char **argv)
+int pam_sm_close_session(pam_handle_t *pamh, int flags,
+                         int argc, const char **argv)
 {
     return need_a_filter(pamh, flags, argc, argv
                         , "close_session", FILTER_RUN2);
@@ -704,8 +704,8 @@ PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags
 /* --------- updating authentication tokens --------- */
 
 
-PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags
-                               , int argc, const char **argv)
+int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
+                    int argc, const char **argv)
 {
     int runN;
 
@@ -720,19 +720,3 @@ PAM_EXTERN int pam_sm_chauthtok(pam_handle_t *pamh, int flags
 
     return need_a_filter(pamh, flags, argc, argv, "chauthtok", runN);
 }
-
-#ifdef PAM_STATIC
-
-/* ------------ stuff for static modules ------------ */
-
-struct pam_module _pam_filter_modstruct = {
-    "pam_filter",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    pam_sm_acct_mgmt,
-    pam_sm_open_session,
-    pam_sm_close_session,
-    pam_sm_chauthtok,
-};
-
-#endif
index 221d8f87e58200519f4960b4bd3a7588723ca7b5..6b6cf2a0e3183a8f9b031f16f272422a6d959b3b 100644 (file)
@@ -111,7 +111,7 @@ static int lookup(const char *name, const char *list, const char **_user)
 
 /* --- authentication management functions (only) --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -210,28 +210,11 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
     }
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
                int argc UNUSED, const char **argv UNUSED)
 {
      return PAM_IGNORE;
 }
 
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_ftp_modstruct = {
-     "pam_ftp",
-     pam_sm_authenticate,
-     pam_sm_setcred,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-};
-
-#endif
-
 /* end of module definition */
index be5f20f3937fc9c19a8feb337d7babf653c732f7..da8237f15f236a44e2e1a6c868d226e696018daf 100644 (file)
@@ -739,14 +739,14 @@ static int check_account(pam_handle_t *pamh, const char *service,
 
 /* --- public authentication management functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh UNUSED, int flags UNUSED,
                     int argc UNUSED, const char **argv UNUSED)
 {
     return PAM_IGNORE;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh, int flags,
                int argc UNUSED, const char **argv UNUSED)
 {
@@ -817,18 +817,3 @@ pam_sm_setcred (pam_handle_t *pamh, int flags,
 }
 
 /* end of module definition */
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_group_modstruct = {
-    "pam_group",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    NULL,
-    NULL,
-    NULL,
-    NULL
-};
-#endif
index 060baada02229431936592445a4556359bd3f0c4..5b5ee416d6f3d8d67237f4b3b5bd23c61072deb9 100644 (file)
@@ -42,7 +42,7 @@ static int read_issue_quoted(pam_handle_t *pamh, FILE *fp, char **prompt);
 
 /* --- authentication management functions (only) --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -120,7 +120,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
     return (retval == PAM_SUCCESS) ? PAM_IGNORE : retval;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
                int argc UNUSED, const char **argv UNUSED)
 {
@@ -291,20 +291,4 @@ read_issue_quoted(pam_handle_t *pamh, FILE *fp, char **prompt)
     return PAM_SUCCESS;
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_issue_modstruct = {
-     "pam_issue",
-     pam_sm_authenticate,
-     pam_sm_setcred,
-     NULL,
-     NULL,
-     NULL,
-     NULL,
-};
-
-#endif
-
 /* end of module definition */
index f82eead221b56066d0603c112f738729b3da1ac4..5dd7b06b30f35fddb735ce7a5e58f87f0e0576a6 100644 (file)
@@ -165,7 +165,6 @@ static void kill_keyrings(pam_handle_t *pamh)
 /*
  * open a PAM session by making sure there's a session keyring
  */
-PAM_EXTERN
 int pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
                        int argc, const char **argv)
 {
@@ -238,7 +237,6 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
 /*
  * close a PAM session by revoking the session keyring if requested
  */
-PAM_EXTERN
 int pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
                         int argc UNUSED, const char **argv UNUSED)
 {
@@ -253,17 +251,3 @@ int pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
        return PAM_SUCCESS;
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_keyinit_modstruct = {
-     "pam_keyinit",
-     NULL,
-     NULL,
-     NULL,
-     pam_sm_open_session,
-     pam_sm_close_session,
-     NULL
-};
-#endif
index 76a33e4128e0a2343fa3ddd2911211d0e6cc93cc..1e2f08d25be9994df13b4006f9558d73fd0b063f 100644 (file)
@@ -566,7 +566,7 @@ cleanup:
 }
 
 /* --- authentication (locking out inactive users) functions --- */
-PAM_EXTERN int
+int
 pam_sm_authenticate(pam_handle_t *pamh, int flags,
                    int argc, const char **argv)
 {
@@ -636,14 +636,14 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags,
     return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED,
                    int argc UNUSED, const char **argv UNUSED)
 {
     return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
                    int argc, const char **argv)
 {
@@ -652,7 +652,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
 
 /* --- session management functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_open_session(pam_handle_t *pamh, int flags,
                    int argc, const char **argv)
 {
@@ -702,7 +702,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags,
     return retval;
 }
 
-PAM_EXTERN int
+int
 pam_sm_close_session (pam_handle_t *pamh, int flags,
                      int argc, const char **argv)
 {
@@ -719,20 +719,4 @@ pam_sm_close_session (pam_handle_t *pamh, int flags,
     return PAM_SUCCESS;
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_lastlog_modstruct = {
-     "pam_lastlog",
-     pam_sm_authenticate,
-     pam_sm_setcred,
-     pam_sm_acct_mgmt,
-     pam_sm_open_session,
-     pam_sm_close_session,
-     NULL,
-};
-
-#endif
-
 /* end of module definition */
index eabc856730f9d0f9a43376c5d8abc7848b3458c0..d63c683ea3270ffdc1266347bd866012219efb8c 100644 (file)
@@ -1002,7 +1002,7 @@ static int setup_limits(pam_handle_t *pamh,
 }
 
 /* now the session stuff */
-PAM_EXTERN int
+int
 pam_sm_open_session (pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -1096,7 +1096,7 @@ out:
     return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 pam_sm_close_session (pam_handle_t *pamh UNUSED, int flags UNUSED,
                      int argc UNUSED, const char **argv UNUSED)
 {
@@ -1104,21 +1104,6 @@ pam_sm_close_session (pam_handle_t *pamh UNUSED, int flags UNUSED,
      return PAM_SUCCESS;
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_limits_modstruct = {
-     "pam_limits",
-     NULL,
-     NULL,
-     NULL,
-     pam_sm_open_session,
-     pam_sm_close_session,
-     NULL
-};
-#endif
-
 /*
  * Copyright (c) Cristian Gafton, 1996-1997, <gafton@redhat.com>
  *                                              All rights reserved.
index 2af2afd8055d7cc9ff4b4f206200e5d226535205..c2364065b59cf523ca98688d34e8d0cde8119994 100644 (file)
@@ -53,7 +53,7 @@
 
 #define LESSER(a, b) ((a) < (b) ? (a) : (b))
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -370,55 +370,37 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
     }
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
                int argc UNUSED, const char **argv UNUSED)
 {
     return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 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
+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
+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
+int
 pam_sm_chauthtok (pam_handle_t *pamh, int flags,
                  int argc, const char **argv)
 {
     return pam_sm_authenticate(pamh, flags, argc, argv);
 }
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_listfile_modstruct = {
-    "pam_listfile",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    pam_sm_acct_mgmt,
-    pam_sm_open_session,
-    pam_sm_close_session,
-    pam_sm_chauthtok,
-};
-
-#endif /* PAM_STATIC */
-
-/* end of module definition */
index aa43bc4cc6ee9ff5c2da4f4465b7e7ab143cac05..e32ea6d75e10a528d1f06994df2d178cc18bcb40 100644 (file)
@@ -55,7 +55,7 @@
 
 #define MODULE_NAME "pam_localuser"
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -123,52 +123,36 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
        return ret;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
                int argc UNUSED, const char **argv UNUSED)
 {
        return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 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
+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
+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
+int
 pam_sm_chauthtok (pam_handle_t *pamh, int flags,
                  int argc, const char **argv)
 {
        return pam_sm_authenticate(pamh, flags, argc, argv);
 }
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_localuser_modstruct = {
-     "pam_localuser",
-     pam_sm_authenticate,
-     pam_sm_setcred,
-     pam_sm_acct_mgmt,
-     pam_sm_open_session,
-     pam_sm_close_session,
-     pam_sm_chauthtok
-};
-
-#endif
index 9a1589e52fca413c031aee27957c71f75460aef5..96bfd98e1e727a9734ba1b74030f61fdf808f605 100644 (file)
@@ -247,34 +247,21 @@ _pam_loginuid(pam_handle_t *pamh, int flags UNUSED,
  *
  * This is here for vsftpd which doesn't seem to run the session stack
  */
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt(pam_handle_t *pamh, int flags, int argc, const char **argv)
 {
        return _pam_loginuid(pamh, flags, argc, argv);
 }
 
-PAM_EXTERN int
+int
 pam_sm_open_session(pam_handle_t *pamh, int flags, int argc, const char **argv)
 {
        return _pam_loginuid(pamh, flags, argc, argv);
 }
 
-PAM_EXTERN int
+int
 pam_sm_close_session(pam_handle_t *pamh UNUSED, int flags UNUSED,
                     int argc UNUSED, const char **argv UNUSED)
 {
        return PAM_SUCCESS;
 }
-
-/* static module data */
-#ifdef PAM_STATIC
-struct pam_module _pam_loginuid_modstruct = {
-    "pam_loginuid",
-    NULL,
-    NULL,
-    pam_sm_acct_mgmt,
-    pam_sm_open_session,
-    pam_sm_close_session,
-    NULL
-};
-#endif
index f5ba173386154800f6abb3c39e488c50d0c60733..0022f6d639656735ff149c0ca36d055ee1e8ee52 100644 (file)
@@ -338,7 +338,7 @@ static int _do_mail(pam_handle_t *, int, int, const char **, int);
 
 /* --- authentication functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh UNUSED, int flags UNUSED,
                     int argc UNUSED, const char **argv UNUSED)
 {
@@ -346,7 +346,6 @@ pam_sm_authenticate (pam_handle_t *pamh UNUSED, int flags UNUSED,
 }
 
 /* Checking mail as part of authentication */
-PAM_EXTERN
 int pam_sm_setcred(pam_handle_t *pamh, int flags, int argc,
     const char **argv)
 {
@@ -357,7 +356,6 @@ int pam_sm_setcred(pam_handle_t *pamh, int flags, int argc,
 
 /* --- session management functions --- */
 
-PAM_EXTERN
 int pam_sm_close_session(pam_handle_t *pamh,int flags,int argc
                         ,const char **argv)
 {
@@ -365,7 +363,6 @@ int pam_sm_close_session(pam_handle_t *pamh,int flags,int argc
 }
 
 /* Checking mail as part of the session management */
-PAM_EXTERN
 int pam_sm_open_session(pam_handle_t *pamh, int flags, int argc,
     const char **argv)
 {
@@ -475,20 +472,4 @@ static int _do_mail(pam_handle_t *pamh, int flags, int argc,
     return retval;
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_mail_modstruct = {
-     "pam_mail",
-     pam_sm_authenticate,
-     pam_sm_setcred,
-     NULL,
-     pam_sm_open_session,
-     pam_sm_close_session,
-     NULL,
-};
-
-#endif
-
 /* end of module definition */
index c9220897508e821e83fba5ab4c0e1792131b7841..daed63aea9948c566c6f2a79c613c0e264a720cd 100644 (file)
@@ -183,7 +183,7 @@ create_homedir (pam_handle_t *pamh, options_t *opt,
 
 /* --- authentication management functions (only) --- */
 
-PAM_EXTERN int
+int
 pam_sm_open_session (pam_handle_t *pamh, int flags, int argc,
                     const char **argv)
 {
@@ -227,25 +227,9 @@ pam_sm_open_session (pam_handle_t *pamh, int flags, int argc,
 }
 
 /* Ignore */
-PAM_EXTERN
 int pam_sm_close_session (pam_handle_t * pamh UNUSED, int flags UNUSED,
                          int argc UNUSED, const char **argv UNUSED)
 {
    return PAM_SUCCESS;
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-struct pam_module _pam_mkhomedir_modstruct =
-{
-   "pam_mkhomedir",
-   NULL,
-   NULL,
-   NULL,
-   pam_sm_open_session,
-   pam_sm_close_session,
-   NULL,
-};
-
-#endif
index ff9b1690a1d3f57524935fed5d90de3171bd0a8a..11c7b5656b7f6a1a3fa93dbd9960d5e81caf2f09 100644 (file)
@@ -39,7 +39,7 @@
 
 /* --- session management functions (only) --- */
 
-PAM_EXTERN int
+int
 pam_sm_close_session (pam_handle_t *pamh UNUSED, int flags UNUSED,
                      int argc UNUSED, const char **argv UNUSED)
 {
@@ -48,7 +48,6 @@ pam_sm_close_session (pam_handle_t *pamh UNUSED, int flags UNUSED,
 
 static char default_motd[] = DEFAULT_MOTD;
 
-PAM_EXTERN
 int pam_sm_open_session(pam_handle_t *pamh, int flags,
                        int argc, const char **argv)
 {
@@ -110,21 +109,4 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags,
      return retval;
 }
 
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_motd_modstruct = {
-     "pam_motd",
-     NULL,
-     NULL,
-     NULL,
-     pam_sm_open_session,
-     pam_sm_close_session,
-     NULL,
-};
-
-#endif
-
 /* end of module definition */
index 92883f5646f7be82709c05e1d309eaf1ab402796..d02ea09eda0d4cf5bbffbd5c70ac804a12fce980 100644 (file)
@@ -2008,7 +2008,7 @@ static int get_user_data(struct instance_data *idata)
 /*
  * Entry point from pam_open_session call.
  */
-PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
+int pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
                                    int argc, const char **argv)
 {
     int i, retval;
@@ -2104,7 +2104,7 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
 /*
  * Entry point from pam_close_session call.
  */
-PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
+int pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
                                     int argc, const char **argv)
 {
     int i, retval;
@@ -2183,18 +2183,3 @@ PAM_EXTERN int pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
 
     return PAM_SUCCESS;
 }
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_namespace_modstruct = {
-     "pam_namespace",
-     NULL,
-     NULL,
-     NULL,
-     pam_sm_open_session,
-     pam_sm_close_session,
-     NULL
-};
-#endif
index f047c3241dd1774f471cc3fbc75a27783db02220..9fd91fdb7e6157a0f752689aaaeaf00d2daeb2a7 100644 (file)
@@ -135,7 +135,7 @@ static int perform_check(pam_handle_t *pamh, struct opt_s *opts)
 
 /* --- authentication management functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -146,7 +146,7 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
     return perform_check(pamh, &opts);
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
                int argc, const char **argv)
 {
@@ -159,7 +159,7 @@ pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
 
 /* --- account management function --- */
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
                 int argc, const char **argv)
 {
@@ -170,21 +170,4 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
     return perform_check(pamh, &opts);
 }
 
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_nologin_modstruct = {
-     "pam_nologin",
-     pam_sm_authenticate,
-     pam_sm_setcred,
-     pam_sm_acct_mgmt,
-     NULL,
-     NULL,
-     NULL,
-};
-
-#endif /* PAM_STATIC */
-
 /* end of module definition */
index e4539b03812820c6d5e8582a753cb617be66f757..c773087a33fc2849a085bc4b962185a6ac341fc2 100644 (file)
@@ -30,7 +30,7 @@
 
 /* --- authentication management functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
                    int argc UNUSED, const char **argv UNUSED)
 {
@@ -56,7 +56,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
     return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED,
               int argc UNUSED, const char **argv UNUSED)
 {
@@ -65,7 +65,7 @@ pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED,
 
 /* --- account management functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt(pam_handle_t *pamh UNUSED, int flags UNUSED,
                 int argc UNUSED, const char **argv UNUSED)
 {
@@ -74,7 +74,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh UNUSED, int flags UNUSED,
 
 /* --- password management --- */
 
-PAM_EXTERN int
+int
 pam_sm_chauthtok(pam_handle_t *pamh UNUSED, int flags UNUSED,
                 int argc UNUSED, const char **argv UNUSED)
 {
@@ -83,14 +83,14 @@ pam_sm_chauthtok(pam_handle_t *pamh UNUSED, int flags UNUSED,
 
 /* --- session management --- */
 
-PAM_EXTERN int
+int
 pam_sm_open_session(pam_handle_t *pamh UNUSED, int flags UNUSED,
                    int argc UNUSED, const char **argv UNUSED)
 {
     return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 pam_sm_close_session(pam_handle_t *pamh UNUSED, int flags UNUSED,
                     int argc UNUSED, const char **argv UNUSED)
 {
@@ -98,19 +98,3 @@ pam_sm_close_session(pam_handle_t *pamh UNUSED, int flags UNUSED,
 }
 
 /* end of module definition */
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_permit_modstruct = {
-    "pam_permit",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    pam_sm_acct_mgmt,
-    pam_sm_open_session,
-    pam_sm_close_session,
-    pam_sm_chauthtok
-};
-
-#endif
index 654edd391aa6b3026995daae14606a78904ad50e..0c07dc18a06ad1307dd5597b688fd9396c56fcfa 100644 (file)
@@ -106,7 +106,7 @@ parse_option (pam_handle_t *pamh, const char *argv, options_t *options)
 /* This module saves the current crypted password in /etc/security/opasswd
    and then compares the new password with all entries in this file. */
 
-PAM_EXTERN int
+int
 pam_sm_chauthtok (pam_handle_t *pamh, int flags, int argc, const char **argv)
 {
   struct passwd *pwd;
@@ -235,16 +235,3 @@ pam_sm_chauthtok (pam_handle_t *pamh, int flags, int argc, const char **argv)
   return PAM_SUCCESS;
 }
 
-
-#ifdef PAM_STATIC
-/* static module data */
-struct pam_module _pam_pwhistory_modstruct = {
-  "pam_pwhistory",
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  pam_sm_chauthtok
-};
-#endif
index bc9e76f79773f32440bddf550c3ad7c7bc78ee03..d6e70300f827018461e3f2706b268146cac0f7eb 100644 (file)
@@ -43,7 +43,6 @@
 #include <security/pam_modutil.h>
 #include <security/pam_ext.h>
 
-PAM_EXTERN
 int pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc,
                         const char **argv)
 {
@@ -130,26 +129,10 @@ int pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc,
 }
 
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
                int argc UNUSED, const char **argv UNUSED)
 {
   return PAM_SUCCESS;
 }
 
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_rhosts_modstruct = {
-  "pam_rhosts",
-  pam_sm_authenticate,
-  pam_sm_setcred,
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-};
-
-#endif
index 88bed0c9b47a9d1cad26e7f21020927e7cebab42..17baabe4030f9d398a979a65631d502e24dd3705 100644 (file)
@@ -135,7 +135,7 @@ check_for_root (pam_handle_t *pamh, int ctrl)
 
 /* --- management functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -146,14 +146,14 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
     return check_for_root (pamh, ctrl);
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
                int argc UNUSED, const char **argv UNUSED)
 {
     return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt (pam_handle_t *pamh, int flags UNUSED,
                  int argc, const char **argv)
 {
@@ -164,7 +164,7 @@ pam_sm_acct_mgmt (pam_handle_t *pamh, int flags UNUSED,
     return check_for_root (pamh, ctrl);
 }
 
-PAM_EXTERN int
+int
 pam_sm_chauthtok (pam_handle_t *pamh, int flags UNUSED,
                  int argc, const char **argv)
 {
@@ -175,20 +175,4 @@ pam_sm_chauthtok (pam_handle_t *pamh, int flags UNUSED,
     return check_for_root (pamh, ctrl);
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_rootok_modstruct = {
-    "pam_rootok",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    pam_sm_acct_mgmt,
-    NULL,
-    NULL,
-    pam_sm_chauthtok,
-};
-
-#endif
-
 /* end of module definition */
index 047413093da55e2eceeac1f4b2d293091d7bc460..e279efac3181734c977329e243e359abe32335a2 100644 (file)
@@ -235,7 +235,6 @@ securetty_perform_check (pam_handle_t *pamh, int ctrl,
 
 /* --- authentication management functions --- */
 
-PAM_EXTERN
 int pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED, int argc,
                        const char **argv)
 {
@@ -247,7 +246,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED, int argc,
     return securetty_perform_check(pamh, ctrl, __FUNCTION__);
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
                int argc UNUSED, const char **argv UNUSED)
 {
@@ -256,7 +255,7 @@ pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
 
 /* --- account management functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt (pam_handle_t *pamh, int flags UNUSED,
                  int argc, const char **argv)
 {
@@ -269,21 +268,4 @@ pam_sm_acct_mgmt (pam_handle_t *pamh, int flags UNUSED,
     return securetty_perform_check(pamh, ctrl, __FUNCTION__);
 }
 
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_securetty_modstruct = {
-     "pam_securetty",
-     pam_sm_authenticate,
-     pam_sm_setcred,
-     pam_sm_acct_mgmt,
-     NULL,
-     NULL,
-     NULL,
-};
-
-#endif /* PAM_STATIC */
-
 /* end of module definition */
index b2a75e02b149b50d99a5f24200f52d12f5872a7c..6daba1edbbba1dcfcd263cf5997f61cba30a6f44 100644 (file)
@@ -757,7 +757,7 @@ create_context(pam_handle_t *pamh, int argc, const char **argv,
   return set_context(pamh, data, debug, verbose);
 }
 
-PAM_EXTERN int
+int
 pam_sm_authenticate(pam_handle_t *pamh UNUSED, int flags UNUSED,
                    int argc UNUSED, const char **argv UNUSED)
 {
@@ -765,14 +765,14 @@ pam_sm_authenticate(pam_handle_t *pamh UNUSED, int flags UNUSED,
   return PAM_AUTH_ERR;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED,
               int argc UNUSED, const char **argv UNUSED)
 {
   return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
                    int argc, const char **argv)
 {
@@ -813,7 +813,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED,
     create_context(pamh, argc, argv, debug, verbose);
 }
 
-PAM_EXTERN int
+int
 pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
index 8af1266a29147eae855583aa2a3a4104ea169f56..0b90a39cbeb57894e4d9bc45a0bde654c6cb0136 100644 (file)
@@ -363,7 +363,7 @@ sepermit_match(pam_handle_t *pamh, const char *cfgfile, const char *user,
                return -1;
 }
 
-PAM_EXTERN int
+int
 pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
                    int argc, const char **argv)
 {
@@ -430,31 +430,17 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
        return rv;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
                 int argc UNUSED, const char **argv UNUSED)
 {
        return PAM_IGNORE;
 }
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
                     int argc, const char **argv)
 {
        return pam_sm_authenticate(pamh, flags, argc, argv);
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_sepermit_modstruct = {
-    "pam_sepermit",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    pam_sm_acct_mgmt,
-    NULL,
-    NULL,
-    NULL
-};
-#endif
index 68bd60743ee48e4d96a2259adea330d6b990b96c..c8acb9e28a7c2b2892fdf3adf50a9825afe477f7 100644 (file)
@@ -104,14 +104,12 @@ static int perform_check(pam_handle_t *pamh)
 
 /* --- authentication management functions (only) --- */
 
-PAM_EXTERN
 int pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
                        int argc UNUSED, const char **argv UNUSED)
 {
     return perform_check(pamh);
 }
 
-PAM_EXTERN
 int pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED,
                   int argc UNUSED, const char **argv UNUSED)
 {
@@ -120,27 +118,10 @@ int pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED,
 
 /* --- account management functions (only) --- */
 
-PAM_EXTERN
 int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
                     int argc UNUSED, const char **argv UNUSED)
 {
     return perform_check(pamh);
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_shells_modstruct = {
-     "pam_shells",
-     pam_sm_authenticate,
-     pam_sm_setcred,
-     pam_sm_acct_mgmt,
-     NULL,
-     NULL,
-     NULL,
-};
-
-#endif /* PAM_STATIC */
-
 /* end of module definition */
index c1695d7f813a84b4fefdd49ac61f45c85984a204..44c3a304bbb5b565ecc52ca507fa2068432a450a 100644 (file)
@@ -213,7 +213,6 @@ wipe_up (pam_handle_t *pamh UNUSED, void *data, int error UNUSED)
      free(data);
 }
 
-PAM_EXTERN
 int pam_sm_authenticate(pam_handle_t *pamh, int flags,
                        int argc, const char **argv)
 {
@@ -281,7 +280,6 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
      return retval;
 }
 
-PAM_EXTERN
 int pam_sm_setcred(pam_handle_t *pamh, int flags,
                   int argc, const char **argv)
 {
@@ -299,7 +297,6 @@ int pam_sm_setcred(pam_handle_t *pamh, int flags,
 
 /* account management functions */
 
-PAM_EXTERN
 int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
                     int argc, const char **argv)
 {
@@ -334,7 +331,6 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
      return PAM_SUCCESS;
 }
 
-PAM_EXTERN
 int pam_sm_open_session(pam_handle_t *pamh, int flags,
                        int argc, const char **argv)
 {
@@ -362,7 +358,6 @@ int pam_sm_open_session(pam_handle_t *pamh, int flags,
      return PAM_SUCCESS;
 }
 
-PAM_EXTERN
 int pam_sm_close_session(pam_handle_t *pamh, int flags,
                         int argc, const char **argv)
 {
@@ -390,7 +385,6 @@ int pam_sm_close_session(pam_handle_t *pamh, int flags,
      return PAM_SUCCESS;
 }
 
-PAM_EXTERN
 int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
                     int argc, const char **argv)
 {
@@ -552,19 +546,3 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
      return retval;
 }
 
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_stress_modstruct = {
-    "pam_stress",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    pam_sm_acct_mgmt,
-    pam_sm_open_session,
-    pam_sm_close_session,
-    pam_sm_chauthtok
-};
-
-#endif
index aa828fcc39d9c9e8741a5d7a3dd7fefc3679169d..c39b1cb168a6bf4c6a4fb657d67483ef3c58b24c 100644 (file)
@@ -400,7 +400,7 @@ evaluate(pam_handle_t *pamh, int debug,
        return PAM_SERVICE_ERR;
 }
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -544,46 +544,33 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
        return ret;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED,
                int argc UNUSED, const char **argv UNUSED)
 {
        return PAM_IGNORE;
 }
 
-PAM_EXTERN int
+int
 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
+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
+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
+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 = {
-    "pam_succeed_if",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    pam_sm_acct_mgmt,
-    pam_sm_open_session,
-    pam_sm_close_session,
-    pam_sm_chauthtok
-};
-#endif
index c712885799de50a6999903717c1b36dd832c1b70..66a515c2bbf7f7cf322b8b731c2cb6d0af45e7bd 100644 (file)
@@ -615,7 +615,7 @@ tally_reset (pam_handle_t *pamh, uid_t uid, struct tally_options *opts)
 
 #ifdef PAM_SM_AUTH
 
-PAM_EXTERN int
+int
 pam_sm_authenticate(pam_handle_t *pamh, int flags,
                    int argc, const char **argv)
 {
@@ -649,7 +649,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags,
   return rvcheck != PAM_SUCCESS ? rvcheck : rvbump;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred(pam_handle_t *pamh, int flags,
               int argc, const char **argv)
 {
@@ -694,7 +694,7 @@ pam_sm_setcred(pam_handle_t *pamh, int flags,
 
 /* To reset failcount of user on successfull login */
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
                 int argc, const char **argv)
 {
@@ -733,33 +733,6 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
 
 /*-----------------------------------------------------------------------*/
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_tally_modstruct = {
-     MODULE_NAME,
-#ifdef PAM_SM_AUTH
-     pam_sm_authenticate,
-     pam_sm_setcred,
-#else
-     NULL,
-     NULL,
-#endif
-#ifdef PAM_SM_ACCOUNT
-     pam_sm_acct_mgmt,
-#else
-     NULL,
-#endif
-     NULL,
-     NULL,
-     NULL,
-};
-
-#endif   /* #ifdef PAM_STATIC */
-
-/*-----------------------------------------------------------------------*/
-
 #else   /* #ifndef MAIN */
 
 static const char *cline_filename = DEFAULT_LOGFILE;
index 9187cbfd7a34e008bea14f8ede0b7fa7431da00d..9f3bebeb742b5804b6330a5896e967a686b7767c 100644 (file)
@@ -737,7 +737,7 @@ tally_reset (pam_handle_t *pamh, uid_t uid, struct tally_options *opts, int old_
 
 /* --- authentication management functions (only) --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
                    int argc, const char **argv)
 {
@@ -770,7 +770,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
   return rv;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred(pam_handle_t *pamh, int flags UNUSED,
               int argc, const char **argv)
 {
@@ -810,7 +810,7 @@ pam_sm_setcred(pam_handle_t *pamh, int flags UNUSED,
 
 /* To reset failcount of user on successfull login */
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
                 int argc, const char **argv)
 {
@@ -846,33 +846,6 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
 
 /*-----------------------------------------------------------------------*/
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_tally2_modstruct = {
-     MODULE_NAME,
-#ifdef PAM_SM_AUTH
-     pam_sm_authenticate,
-     pam_sm_setcred,
-#else
-     NULL,
-     NULL,
-#endif
-#ifdef PAM_SM_ACCOUNT
-     pam_sm_acct_mgmt,
-#else
-     NULL,
-#endif
-     NULL,
-     NULL,
-     NULL,
-};
-
-#endif   /* #ifdef PAM_STATIC */
-
-/*-----------------------------------------------------------------------*/
-
 #else   /* #ifndef MAIN */
 
 static const char *cline_filename = DEFAULT_LOGFILE;
index c94737ca69d10f1b9c353df03a113d2539b8d304..75d08645ba3b9a4a7f437f952c49926bba18922f 100644 (file)
@@ -588,7 +588,7 @@ check_account(pam_handle_t *pamh, const char *service,
 
 /* --- public account management functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
                 int argc, const char **argv)
 {
@@ -663,18 +663,3 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
 }
 
 /* end of module definition */
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_time_modstruct = {
-    "pam_time",
-    NULL,
-    NULL,
-    pam_sm_acct_mgmt,
-    NULL,
-    NULL,
-    NULL
-};
-#endif
index 1bf0e84ba4e770f41da107bfc6dbf083f63f5d8d..b18efdfdaec66d7142dd26511a06921c42edd966 100644 (file)
@@ -357,7 +357,7 @@ verbose_success(pam_handle_t *pamh, long diff)
        pam_info(pamh, _("Access granted (last access was %ld seconds ago)."), diff);
 }
 
-PAM_EXTERN int
+int
 pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv)
 {
        struct stat st;
@@ -547,13 +547,13 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv)
        return PAM_AUTH_ERR;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED, int argc UNUSED, const char **argv UNUSED)
 {
        return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED, int argc, const char **argv)
 {
        char path[BUFLEN], subdir[BUFLEN], *text, *p;
@@ -670,27 +670,12 @@ pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED, int argc, const char *
        return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 pam_sm_close_session(pam_handle_t *pamh UNUSED, int flags UNUSED, int argc UNUSED, const char **argv UNUSED)
 {
        return PAM_SUCCESS;
 }
 
-#ifdef PAM_STATIC
-/* static module data */
-
-struct pam_module _pam_timestamp_modstruct = {
-       "pam_timestamp",
-       pam_sm_authenticate,
-       pam_sm_setcred,
-       NULL,
-       pam_sm_open_session,
-       pam_sm_close_session,
-       NULL
-};
-#endif
-
-
 #else /* PAM_TIMESTAMP_MAIN */
 
 #define USAGE "Usage: %s [[-k] | [-d]] [target user]\n"
index 6003f4e6684c3c88ccdbe49438106c369fd6b3de..bce3ab778fc2a7b5177e2022254cb12ad321c1b9 100644 (file)
@@ -360,16 +360,3 @@ pam_sm_close_session (pam_handle_t *pamh, int flags, int argc,
     }
   return PAM_SUCCESS;
 }
-
-/* static module data */
-#ifdef PAM_STATIC
-struct pam_module _pam_tty_audit_modstruct = {
-  "pam_tty_audit",
-  NULL,
-  NULL,
-  NULL,
-  pam_sm_open_session,
-  pam_sm_close_session,
-  NULL
-};
-#endif
index 863f0387c8d186c7080b03be992f08cb56513fd5..ab4906455fa10d40bce7714aabbffaeefcb5d4fb 100644 (file)
@@ -249,7 +249,7 @@ setup_limits_from_gecos (pam_handle_t *pamh, options_t *options,
 }
 
 
-PAM_EXTERN int
+int
 pam_sm_open_session (pam_handle_t *pamh, int flags UNUSED,
                      int argc, const char **argv)
 {
@@ -297,27 +297,11 @@ pam_sm_open_session (pam_handle_t *pamh, int flags UNUSED,
   return retval;
 }
 
-PAM_EXTERN int
+int
 pam_sm_close_session (pam_handle_t *pamh UNUSED, int flags UNUSED,
                      int argc UNUSED, const char **argv UNUSED)
 {
   return PAM_SUCCESS;
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_umask_modstruct = {
-     "pam_umask",
-     NULL,
-     NULL,
-     NULL,
-     pam_sm_open_session,
-     pam_sm_close_session,
-     NULL
-};
-
-#endif
-
 /* end of module definition */
index 88e6125dda05e03ad6f0732e0ff7bf27afdf0c63..56df17820c13f3e4d7c5a9c8891508a0bee7e45d 100644 (file)
@@ -34,8 +34,7 @@ pam_unix_la_LIBADD = $(top_builddir)/libpam/libpam.la \
 
 securelib_LTLIBRARIES = pam_unix.la
 
-noinst_HEADERS = md5.h support.h yppasswd.h bigcrypt.h passverify.h \
-                pam_unix_static.h
+noinst_HEADERS = md5.h support.h yppasswd.h bigcrypt.h passverify.h
 
 sbin_PROGRAMS = unix_chkpwd unix_update
 
@@ -44,9 +43,6 @@ noinst_PROGRAMS = bigcrypt
 pam_unix_la_SOURCES = bigcrypt.c pam_unix_acct.c \
        pam_unix_auth.c pam_unix_passwd.c pam_unix_sess.c support.c \
        passverify.c yppasswd_xdr.c md5_good.c md5_broken.c
-if STATIC_MODULES
-pam_unix_la_SOURCES += pam_unix_static.c
-endif
 
 bigcrypt_SOURCES = bigcrypt.c bigcrypt_main.c
 bigcrypt_CFLAGS = $(AM_CFLAGS)
index f8b39c9157bdd2f153b6e7d6bc97d8318b0ddfe5..17a0890f938fc91e846d2d29e5cb0d38aad202cc 100644 (file)
 
 /* indicate that the following groups are defined */
 
-#ifdef PAM_STATIC
-# include "pam_unix_static.h"
-#else
-# define PAM_SM_ACCOUNT
-#endif
+#define PAM_SM_ACCOUNT
 
 #include <security/pam_modules.h>
 #include <security/pam_ext.h>
index 9a547b3af408fb68483b82e1b4b0d1a8df5fc1ee..9f66c5d6a15c5f5d1705e88121df478d53b7a95e 100644 (file)
 
 /* indicate the following groups are defined */
 
-#ifdef PAM_STATIC
-# include "pam_unix_static.h"
-#else
-# define PAM_SM_AUTH
-#endif
+#define PAM_SM_AUTH
 
 #define _PAM_EXTERN_FUNCTIONS
 #include <security/_pam_macros.h>
index c2e5de5e1e0976962266272b6089f14117c3ed47..e3d320969c97a4675f2d6c81a5d52ef6926b4af3 100644 (file)
 
 /* indicate the following groups are defined */
 
-#ifdef PAM_STATIC
-# include "pam_unix_static.h"
-#else
-# define PAM_SM_PASSWORD
-#endif
+#define PAM_SM_PASSWORD
 
 #include <security/pam_modules.h>
 #include <security/pam_ext.h>
index 5d001816dab8d90d9f5abc798a5e5f2dc14d7872..dbc62983e4770f2d113a740734e24a92e7db9b48 100644 (file)
 
 /* indicate the following groups are defined */
 
-#ifdef PAM_STATIC
-# include "pam_unix_static.h"
-#else
-# define PAM_SM_SESSION
-#endif
+#define PAM_SM_SESSION
 
 #include <security/_pam_macros.h>
 #include <security/pam_modules.h>
diff --git a/modules/pam_unix/pam_unix_static.c b/modules/pam_unix/pam_unix_static.c
deleted file mode 100644 (file)
index 160268c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "config.h"
-
-#ifdef PAM_STATIC
-
-#define static extern
-#define PAM_SM_ACCOUNT
-#define PAM_SM_AUTH
-#define PAM_SM_PASSWORD
-#define PAM_SM_SESSION
-#include "pam_unix_static.h"
-#include <security/pam_modules.h>
-
-struct pam_module _pam_unix_modstruct = {
-       "pam_unix",
-       pam_sm_authenticate,
-       pam_sm_setcred,
-       pam_sm_acct_mgmt,
-       pam_sm_open_session,
-       pam_sm_close_session,
-       pam_sm_chauthtok,
-};
-
-#endif
diff --git a/modules/pam_unix/pam_unix_static.h b/modules/pam_unix/pam_unix_static.h
deleted file mode 100644 (file)
index 39b05ef..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#define pam_sm_acct_mgmt _pam_unix_sm_acct_mgmt
-#define pam_sm_authenticate _pam_unix_sm_authenticate
-#define pam_sm_setcred _pam_unix_sm_setcred
-#define pam_sm_chauthtok _pam_unix_sm_chauthtok
-#define pam_sm_open_session _pam_unix_sm_open_session
-#define pam_sm_close_session _pam_unix_sm_close_session
index 8df1a40cb041971acb2dcdac30fb5d7cb87747c9..09ab8d33800105cced03926b1418fbc0d396339a 100644 (file)
@@ -334,7 +334,7 @@ user_lookup (pam_handle_t *pamh, const char *database, const char *cryptmode,
 
 /* --- authentication management functions (only) --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
                    int argc, const char **argv)
 {
@@ -423,14 +423,14 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED,
      return PAM_IGNORE;
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags UNUSED,
               int argc UNUSED, const char **argv UNUSED)
 {
     return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
                 int argc, const char **argv)
 {
@@ -475,23 +475,6 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
     return PAM_SUCCESS;
 }
 
-
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_userdb_modstruct = {
-     "pam_userdb",
-     pam_sm_authenticate,
-     pam_sm_setcred,
-     pam_sm_acct_mgmt,
-     NULL,
-     NULL,
-     NULL,
-};
-
-#endif
-
 /*
  * Copyright (c) Cristian Gafton <gafton@redhat.com>, 1999
  *                                              All rights reserved
index a26c48d7ceb39c07446ef371d7d1213ee4539def..1d196ad3581c6104389f596d6d59719412f0b1eb 100644 (file)
@@ -54,7 +54,6 @@ static void log_items(pam_handle_t *pamh, const char *function, int flags)
 
 /* --- authentication management functions (only) --- */
 
-PAM_EXTERN
 int pam_sm_authenticate(pam_handle_t *pamh, int flags,
                        int argc UNUSED, const char **argv UNUSED)
 {
@@ -62,7 +61,6 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
     return PAM_IGNORE;
 }
 
-PAM_EXTERN
 int pam_sm_setcred(pam_handle_t *pamh, int flags,
                   int argc UNUSED, const char **argv UNUSED)
 {
@@ -72,7 +70,6 @@ int pam_sm_setcred(pam_handle_t *pamh, int flags,
 
 /* password updating functions */
 
-PAM_EXTERN
 int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
                     int argc UNUSED, const char **argv UNUSED)
 {
@@ -80,7 +77,7 @@ int pam_sm_chauthtok(pam_handle_t *pamh, int flags,
     return PAM_IGNORE;
 }
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
                 int argc UNUSED, const char **argv UNUSED)
 {
@@ -88,7 +85,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
     return PAM_IGNORE;
 }
 
-PAM_EXTERN int
+int
 pam_sm_open_session(pam_handle_t *pamh, int flags,
                    int argc UNUSED, const char **argv UNUSED)
 {
@@ -96,7 +93,7 @@ pam_sm_open_session(pam_handle_t *pamh, int flags,
     return PAM_IGNORE;
 }
 
-PAM_EXTERN int
+int
 pam_sm_close_session(pam_handle_t *pamh, int flags,
                     int argc UNUSED, const char **argv UNUSED)
 {
@@ -104,20 +101,4 @@ pam_sm_close_session(pam_handle_t *pamh, int flags,
     return PAM_IGNORE;
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_warn_modstruct = {
-    "pam_warn",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    pam_sm_acct_mgmt,
-    pam_sm_open_session,
-    pam_sm_close_session,
-    pam_sm_chauthtok,
-};
-
-#endif
-
 /* end of module definition */
index d7d8096e9623d0e327f5461eeabdfba1de1932b8..6ea7b8478822bcdd3321356286c439598670b698 100644 (file)
@@ -232,7 +232,7 @@ perform_check (pam_handle_t *pamh, int ctrl, const char *use_group)
 
 /* --- authentication management functions --- */
 
-PAM_EXTERN int
+int
 pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
                     int argc, const char **argv)
 {
@@ -244,14 +244,14 @@ pam_sm_authenticate (pam_handle_t *pamh, int flags UNUSED,
     return perform_check(pamh, ctrl, use_group);
 }
 
-PAM_EXTERN int
+int
 pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED,
                int argc UNUSED, const char **argv UNUSED)
 {
     return PAM_SUCCESS;
 }
 
-PAM_EXTERN int
+int
 pam_sm_acct_mgmt (pam_handle_t *pamh, int flags UNUSED,
                  int argc, const char **argv)
 {
@@ -263,22 +263,6 @@ pam_sm_acct_mgmt (pam_handle_t *pamh, int flags UNUSED,
     return perform_check(pamh, ctrl, use_group);
 }
 
-#ifdef PAM_STATIC
-
-/* static module data */
-
-struct pam_module _pam_wheel_modstruct = {
-    "pam_wheel",
-    pam_sm_authenticate,
-    pam_sm_setcred,
-    pam_sm_acct_mgmt,
-    NULL,
-    NULL,
-    NULL
-};
-
-#endif /* PAM_STATIC */
-
 /*
  * Copyright (c) Cristian Gafton <gafton@redhat.com>, 1996, 1997
  *                                              All rights reserved
index 2be4351344484d2ca5b858b58b6bc8ac0f589b6c..6778aa84165cb1cae78c19f48af33c224d741a81 100644 (file)
@@ -798,16 +798,3 @@ pam_sm_close_session (pam_handle_t *pamh, int flags UNUSED,
 
        return PAM_SUCCESS;
 }
-
-/* static module data */
-#ifdef PAM_STATIC
-struct pam_module _pam_xauth_modstruct = {
-  "pam_xauth",
-  NULL,
-  NULL,
-  NULL,
-  pam_sm_open_session,
-  pam_sm_close_session,
-  NULL
-};
-#endif
index 76d9640cb690e35f947017ed3729a6330bf981c2..fcec3d83c0377a458da79ded2c05018efbf70953 100644 (file)
@@ -29,7 +29,6 @@
 ./libpam/pam_prelude.c
 ./libpam/pam_session.c
 ./libpam/pam_start.c
-./libpam/pam_static.c
 ./libpam/pam_strerror.c
 ./libpam/pam_syslog.c
 ./libpam/pam_vprompt.c
index 3000055c94abca77dec8fe92240fd3d987187405..709271634c81916772755ce6de67b1be6f603d06 100644 (file)
@@ -19,9 +19,6 @@
 /* Simple program to see if dlopen() would succeed. */
 int main(int argc, char **argv)
 {
-#ifdef PAM_STATIC
-  return 77;
-#else
   int i;
   struct stat st;
   char buf[PATH_MAX];
@@ -43,5 +40,4 @@ int main(int argc, char **argv)
     }
   }
   return 0;
-#endif
 }