From 2a693f7e3520961aa18033b30334869bab00e042 Mon Sep 17 00:00:00 2001
From: Thorsten Kukuk <kukuk@thkukuk.de>
Date: Tue, 22 Mar 2016 15:23:35 +0100
Subject: [PATCH 3/3] Remove all PAM_STATIC usage Remove pam_static.c from
 POTFILES

---
 modules/pam_access/pam_access.c         | 15 ---------------
 modules/pam_cracklib/pam_cracklib.c     | 13 -------------
 modules/pam_debug/pam_debug.c           | 16 ----------------
 modules/pam_deny/pam_deny.c             | 13 -------------
 modules/pam_echo/pam_echo.c             | 15 ---------------
 modules/pam_env/pam_env.c               | 16 ----------------
 modules/pam_exec/pam_exec.c             | 12 ------------
 modules/pam_faildelay/pam_faildelay.c   | 17 -----------------
 modules/pam_filter/pam_filter.c         | 16 ----------------
 modules/pam_ftp/pam_ftp.c               | 17 -----------------
 modules/pam_group/pam_group.c           | 15 ---------------
 modules/pam_issue/pam_issue.c           | 16 ----------------
 modules/pam_keyinit/pam_keyinit.c       | 14 --------------
 modules/pam_lastlog/pam_lastlog.c       | 16 ----------------
 modules/pam_limits/pam_limits.c         | 15 ---------------
 modules/pam_listfile/pam_listfile.c     | 18 ------------------
 modules/pam_localuser/pam_localuser.c   | 16 ----------------
 modules/pam_loginuid/pam_loginuid.c     | 13 -------------
 modules/pam_mail/pam_mail.c             | 16 ----------------
 modules/pam_mkhomedir/pam_mkhomedir.c   | 15 ---------------
 modules/pam_motd/pam_motd.c             | 17 -----------------
 modules/pam_namespace/pam_namespace.c   | 15 ---------------
 modules/pam_nologin/pam_nologin.c       | 17 -----------------
 modules/pam_permit/pam_permit.c         | 16 ----------------
 modules/pam_pwhistory/pam_pwhistory.c   | 13 -------------
 modules/pam_rhosts/pam_rhosts.c         | 16 ----------------
 modules/pam_rootok/pam_rootok.c         | 16 ----------------
 modules/pam_securetty/pam_securetty.c   | 17 -----------------
 modules/pam_sepermit/pam_sepermit.c     | 14 --------------
 modules/pam_shells/pam_shells.c         | 16 ----------------
 modules/pam_stress/pam_stress.c         | 16 ----------------
 modules/pam_succeed_if/pam_succeed_if.c | 13 -------------
 modules/pam_tally/pam_tally.c           | 27 ---------------------------
 modules/pam_tally2/pam_tally2.c         | 27 ---------------------------
 modules/pam_time/pam_time.c             | 15 ---------------
 modules/pam_timestamp/pam_timestamp.c   | 15 ---------------
 modules/pam_tty_audit/pam_tty_audit.c   | 13 -------------
 modules/pam_umask/pam_umask.c           | 16 ----------------
 modules/pam_unix/pam_unix_acct.c        |  6 +-----
 modules/pam_unix/pam_unix_auth.c        |  6 +-----
 modules/pam_unix/pam_unix_passwd.c      |  6 +-----
 modules/pam_unix/pam_unix_sess.c        |  6 +-----
 modules/pam_userdb/pam_userdb.c         | 17 -----------------
 modules/pam_warn/pam_warn.c             | 16 ----------------
 modules/pam_wheel/pam_wheel.c           | 16 ----------------
 modules/pam_xauth/pam_xauth.c           | 13 -------------
 po/POTFILES.in                          |  1 -
 47 files changed, 4 insertions(+), 686 deletions(-)

diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c
index 39dc5c4..ca73545 100644
--- a/modules/pam_access/pam_access.c
+++ b/modules/pam_access/pam_access.c
@@ -948,18 +948,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
diff --git a/modules/pam_cracklib/pam_cracklib.c b/modules/pam_cracklib/pam_cracklib.c
index d5fa2e7..1654931 100644
--- a/modules/pam_cracklib/pam_cracklib.c
+++ b/modules/pam_cracklib/pam_cracklib.c
@@ -858,19 +858,6 @@ pam_sm_chauthtok(pam_handle_t *pamh, int flags, int argc, const char **argv)
 
 
 
-#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
diff --git a/modules/pam_debug/pam_debug.c b/modules/pam_debug/pam_debug.c
index 9477de8..9b68d38 100644
--- a/modules/pam_debug/pam_debug.c
+++ b/modules/pam_debug/pam_debug.c
@@ -143,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
diff --git a/modules/pam_deny/pam_deny.c b/modules/pam_deny/pam_deny.c
index a857cc9..155a1f5 100644
--- a/modules/pam_deny/pam_deny.c
+++ b/modules/pam_deny/pam_deny.c
@@ -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
diff --git a/modules/pam_echo/pam_echo.c b/modules/pam_echo/pam_echo.c
index d0879fb..860ff0a 100644
--- a/modules/pam_echo/pam_echo.c
+++ b/modules/pam_echo/pam_echo.c
@@ -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
diff --git a/modules/pam_env/pam_env.c b/modules/pam_env/pam_env.c
index f9f814f..0b8002f 100644
--- a/modules/pam_env/pam_env.c
+++ b/modules/pam_env/pam_env.c
@@ -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 */
diff --git a/modules/pam_exec/pam_exec.c b/modules/pam_exec/pam_exec.c
index 4c33e9d..0ab6548 100644
--- a/modules/pam_exec/pam_exec.c
+++ b/modules/pam_exec/pam_exec.c
@@ -512,15 +512,3 @@ pam_sm_close_session(pam_handle_t *pamh, int flags UNUSED,
 {
   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
diff --git a/modules/pam_faildelay/pam_faildelay.c b/modules/pam_faildelay/pam_faildelay.c
index 2b36f26..7ea8f83 100644
--- a/modules/pam_faildelay/pam_faildelay.c
+++ b/modules/pam_faildelay/pam_faildelay.c
@@ -209,21 +209,4 @@ int pam_sm_setcred(pam_handle_t *pamh UNUSED, int flags 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 */
diff --git a/modules/pam_filter/pam_filter.c b/modules/pam_filter/pam_filter.c
index 35460d3..6e6a0cf 100644
--- a/modules/pam_filter/pam_filter.c
+++ b/modules/pam_filter/pam_filter.c
@@ -720,19 +720,3 @@ 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
diff --git a/modules/pam_ftp/pam_ftp.c b/modules/pam_ftp/pam_ftp.c
index be20d27..6b6cf2a 100644
--- a/modules/pam_ftp/pam_ftp.c
+++ b/modules/pam_ftp/pam_ftp.c
@@ -217,21 +217,4 @@ pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags 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 */
diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c
index 9d7c3e6..da8237f 100644
--- a/modules/pam_group/pam_group.c
+++ b/modules/pam_group/pam_group.c
@@ -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
diff --git a/modules/pam_issue/pam_issue.c b/modules/pam_issue/pam_issue.c
index 769ba22..5b5ee41 100644
--- a/modules/pam_issue/pam_issue.c
+++ b/modules/pam_issue/pam_issue.c
@@ -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 */
diff --git a/modules/pam_keyinit/pam_keyinit.c b/modules/pam_keyinit/pam_keyinit.c
index 6246c4a..5dd7b06 100644
--- a/modules/pam_keyinit/pam_keyinit.c
+++ b/modules/pam_keyinit/pam_keyinit.c
@@ -251,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
diff --git a/modules/pam_lastlog/pam_lastlog.c b/modules/pam_lastlog/pam_lastlog.c
index 1573fd3..1e2f08d 100644
--- a/modules/pam_lastlog/pam_lastlog.c
+++ b/modules/pam_lastlog/pam_lastlog.c
@@ -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 */
diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c
index 2b63426..d63c683 100644
--- a/modules/pam_limits/pam_limits.c
+++ b/modules/pam_limits/pam_limits.c
@@ -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.
diff --git a/modules/pam_listfile/pam_listfile.c b/modules/pam_listfile/pam_listfile.c
index d94370c..c236406 100644
--- a/modules/pam_listfile/pam_listfile.c
+++ b/modules/pam_listfile/pam_listfile.c
@@ -404,21 +404,3 @@ pam_sm_chauthtok (pam_handle_t *pamh, int flags,
 {
     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 */
diff --git a/modules/pam_localuser/pam_localuser.c b/modules/pam_localuser/pam_localuser.c
index 3328681..e32ea6d 100644
--- a/modules/pam_localuser/pam_localuser.c
+++ b/modules/pam_localuser/pam_localuser.c
@@ -156,19 +156,3 @@ pam_sm_chauthtok (pam_handle_t *pamh, int flags,
 {
 	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
diff --git a/modules/pam_loginuid/pam_loginuid.c b/modules/pam_loginuid/pam_loginuid.c
index 62bbe9f..96bfd98 100644
--- a/modules/pam_loginuid/pam_loginuid.c
+++ b/modules/pam_loginuid/pam_loginuid.c
@@ -265,16 +265,3 @@ pam_sm_close_session(pam_handle_t *pamh UNUSED, int flags 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
diff --git a/modules/pam_mail/pam_mail.c b/modules/pam_mail/pam_mail.c
index ded8387..0022f6d 100644
--- a/modules/pam_mail/pam_mail.c
+++ b/modules/pam_mail/pam_mail.c
@@ -472,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 */
diff --git a/modules/pam_mkhomedir/pam_mkhomedir.c b/modules/pam_mkhomedir/pam_mkhomedir.c
index d2c7257..daed63a 100644
--- a/modules/pam_mkhomedir/pam_mkhomedir.c
+++ b/modules/pam_mkhomedir/pam_mkhomedir.c
@@ -233,18 +233,3 @@ int 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_mkhomedir_modstruct =
-{
-   "pam_mkhomedir",
-   NULL,
-   NULL,
-   NULL,
-   pam_sm_open_session,
-   pam_sm_close_session,
-   NULL,
-};
-
-#endif
diff --git a/modules/pam_motd/pam_motd.c b/modules/pam_motd/pam_motd.c
index 2238236..11c7b56 100644
--- a/modules/pam_motd/pam_motd.c
+++ b/modules/pam_motd/pam_motd.c
@@ -109,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 */
diff --git a/modules/pam_namespace/pam_namespace.c b/modules/pam_namespace/pam_namespace.c
index d52fc95..d02ea09 100644
--- a/modules/pam_namespace/pam_namespace.c
+++ b/modules/pam_namespace/pam_namespace.c
@@ -2183,18 +2183,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_namespace_modstruct = {
-     "pam_namespace",
-     NULL,
-     NULL,
-     NULL,
-     pam_sm_open_session,
-     pam_sm_close_session,
-     NULL
-};
-#endif
diff --git a/modules/pam_nologin/pam_nologin.c b/modules/pam_nologin/pam_nologin.c
index 1ecab61..9fd91fd 100644
--- a/modules/pam_nologin/pam_nologin.c
+++ b/modules/pam_nologin/pam_nologin.c
@@ -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 */
diff --git a/modules/pam_permit/pam_permit.c b/modules/pam_permit/pam_permit.c
index 56ec5f9..c773087 100644
--- a/modules/pam_permit/pam_permit.c
+++ b/modules/pam_permit/pam_permit.c
@@ -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
diff --git a/modules/pam_pwhistory/pam_pwhistory.c b/modules/pam_pwhistory/pam_pwhistory.c
index 407acf3..0c07dc1 100644
--- a/modules/pam_pwhistory/pam_pwhistory.c
+++ b/modules/pam_pwhistory/pam_pwhistory.c
@@ -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
diff --git a/modules/pam_rhosts/pam_rhosts.c b/modules/pam_rhosts/pam_rhosts.c
index cde597f..d6e7030 100644
--- a/modules/pam_rhosts/pam_rhosts.c
+++ b/modules/pam_rhosts/pam_rhosts.c
@@ -136,19 +136,3 @@ pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags 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
diff --git a/modules/pam_rootok/pam_rootok.c b/modules/pam_rootok/pam_rootok.c
index 557d0ea..17baabe 100644
--- a/modules/pam_rootok/pam_rootok.c
+++ b/modules/pam_rootok/pam_rootok.c
@@ -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 */
diff --git a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c
index e57f32b..e279efa 100644
--- a/modules/pam_securetty/pam_securetty.c
+++ b/modules/pam_securetty/pam_securetty.c
@@ -268,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 */
diff --git a/modules/pam_sepermit/pam_sepermit.c b/modules/pam_sepermit/pam_sepermit.c
index 6e7cc1b..0b90a39 100644
--- a/modules/pam_sepermit/pam_sepermit.c
+++ b/modules/pam_sepermit/pam_sepermit.c
@@ -444,17 +444,3 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags,
 	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
diff --git a/modules/pam_shells/pam_shells.c b/modules/pam_shells/pam_shells.c
index 31e8b36..c8acb9e 100644
--- a/modules/pam_shells/pam_shells.c
+++ b/modules/pam_shells/pam_shells.c
@@ -124,20 +124,4 @@ int pam_sm_acct_mgmt(pam_handle_t *pamh, int flags 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 */
diff --git a/modules/pam_stress/pam_stress.c b/modules/pam_stress/pam_stress.c
index 7313953..44c3a30 100644
--- a/modules/pam_stress/pam_stress.c
+++ b/modules/pam_stress/pam_stress.c
@@ -546,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
diff --git a/modules/pam_succeed_if/pam_succeed_if.c b/modules/pam_succeed_if/pam_succeed_if.c
index f85cffb..c39b1cb 100644
--- a/modules/pam_succeed_if/pam_succeed_if.c
+++ b/modules/pam_succeed_if/pam_succeed_if.c
@@ -574,16 +574,3 @@ 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
diff --git a/modules/pam_tally/pam_tally.c b/modules/pam_tally/pam_tally.c
index fe546a5..66a515c 100644
--- a/modules/pam_tally/pam_tally.c
+++ b/modules/pam_tally/pam_tally.c
@@ -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;
diff --git a/modules/pam_tally2/pam_tally2.c b/modules/pam_tally2/pam_tally2.c
index f32d996..9f3bebe 100644
--- a/modules/pam_tally2/pam_tally2.c
+++ b/modules/pam_tally2/pam_tally2.c
@@ -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;
diff --git a/modules/pam_time/pam_time.c b/modules/pam_time/pam_time.c
index c9dfbff..75d0864 100644
--- a/modules/pam_time/pam_time.c
+++ b/modules/pam_time/pam_time.c
@@ -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
diff --git a/modules/pam_timestamp/pam_timestamp.c b/modules/pam_timestamp/pam_timestamp.c
index 65aaf3f..b18efdf 100644
--- a/modules/pam_timestamp/pam_timestamp.c
+++ b/modules/pam_timestamp/pam_timestamp.c
@@ -676,21 +676,6 @@ pam_sm_close_session(pam_handle_t *pamh UNUSED, int flags UNUSED, int argc UNUSE
 	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"
diff --git a/modules/pam_tty_audit/pam_tty_audit.c b/modules/pam_tty_audit/pam_tty_audit.c
index 6003f4e..bce3ab7 100644
--- a/modules/pam_tty_audit/pam_tty_audit.c
+++ b/modules/pam_tty_audit/pam_tty_audit.c
@@ -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
diff --git a/modules/pam_umask/pam_umask.c b/modules/pam_umask/pam_umask.c
index 9532856..ab49064 100644
--- a/modules/pam_umask/pam_umask.c
+++ b/modules/pam_umask/pam_umask.c
@@ -304,20 +304,4 @@ 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_umask_modstruct = {
-     "pam_umask",
-     NULL,
-     NULL,
-     NULL,
-     pam_sm_open_session,
-     pam_sm_close_session,
-     NULL
-};
-
-#endif
-
 /* end of module definition */
diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c
index f8b39c9..17a0890 100644
--- a/modules/pam_unix/pam_unix_acct.c
+++ b/modules/pam_unix/pam_unix_acct.c
@@ -53,11 +53,7 @@
 
 /* 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>
diff --git a/modules/pam_unix/pam_unix_auth.c b/modules/pam_unix/pam_unix_auth.c
index 9a547b3..9f66c5d 100644
--- a/modules/pam_unix/pam_unix_auth.c
+++ b/modules/pam_unix/pam_unix_auth.c
@@ -50,11 +50,7 @@
 
 /* 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>
diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c
index c2e5de5..e3d3209 100644
--- a/modules/pam_unix/pam_unix_passwd.c
+++ b/modules/pam_unix/pam_unix_passwd.c
@@ -64,11 +64,7 @@
 
 /* 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>
diff --git a/modules/pam_unix/pam_unix_sess.c b/modules/pam_unix/pam_unix_sess.c
index 5d00181..dbc6298 100644
--- a/modules/pam_unix/pam_unix_sess.c
+++ b/modules/pam_unix/pam_unix_sess.c
@@ -49,11 +49,7 @@
 
 /* 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_userdb/pam_userdb.c b/modules/pam_userdb/pam_userdb.c
index ea5f824..09ab8d3 100644
--- a/modules/pam_userdb/pam_userdb.c
+++ b/modules/pam_userdb/pam_userdb.c
@@ -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
diff --git a/modules/pam_warn/pam_warn.c b/modules/pam_warn/pam_warn.c
index bd82a0b..1d196ad 100644
--- a/modules/pam_warn/pam_warn.c
+++ b/modules/pam_warn/pam_warn.c
@@ -101,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 */
diff --git a/modules/pam_wheel/pam_wheel.c b/modules/pam_wheel/pam_wheel.c
index 7cfd23f..6ea7b84 100644
--- a/modules/pam_wheel/pam_wheel.c
+++ b/modules/pam_wheel/pam_wheel.c
@@ -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
diff --git a/modules/pam_xauth/pam_xauth.c b/modules/pam_xauth/pam_xauth.c
index 2be4351..6778aa8 100644
--- a/modules/pam_xauth/pam_xauth.c
+++ b/modules/pam_xauth/pam_xauth.c
@@ -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
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 76d9640..fcec3d8 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -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
-- 
1.8.5.6

