]> granicus.if.org Git - linux-pam/commitdiff
Fix compile time errors in --enable-static-modules mode
authorMatveychikov Ilya <i.matveychikov@securitycode.ru>
Tue, 17 Jan 2012 07:16:49 +0000 (11:16 +0400)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 27 Jan 2012 00:17:54 +0000 (00:17 +0000)
* libpam/pam_static_modules.h (_pam_rhosts_auth_modstruct): Remove
obsolete declaration.
(static_modules): Remove undefined reference to
_pam_rhosts_auth_modstruct.
* modules/pam_pwhistory/opasswd.h: Rename {save,check}_old_password to
{save,check}_old_pass in order to avoid conflicts with pam_unix.
* modules/pam_pwhistory/opasswd.c: Likewise.
* modules/pam_pwhistory/pam_pwhistory.c: Likewise.
* modules/pam_tally2/pam_tally2.c: Rename _pam_tally_modstruct to
_pam_tally2_modstruct.

Signed-off-by: Matveychikov Ilya <i.matveychikov@securitycode.ru>
libpam/pam_static_modules.h
modules/pam_pwhistory/opasswd.c
modules/pam_pwhistory/opasswd.h
modules/pam_pwhistory/pam_pwhistory.c
modules/pam_tally2/pam_tally2.c

index 999adc2a8c7ebf1e8a23d38c0ba55a6ecdce525d..67d81359c626cdc5b7f086abd1af5aa489bef6bf 100644 (file)
@@ -63,7 +63,6 @@ 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_rhosts_auth_modstruct;
 extern struct pam_module _pam_rootok_modstruct;
 extern struct pam_module _pam_securetty_modstruct;
 #ifdef WITH_SELINUX
@@ -124,7 +123,6 @@ static struct pam_module *static_modules[] = {
   &_pam_permit_modstruct,
   &_pam_pwhistory_modstruct,
   &_pam_rhosts_modstruct,
-  &_pam_rhosts_auth_modstruct,
   &_pam_rootok_modstruct,
   &_pam_securetty_modstruct,
 #ifdef WITH_SELINUX
index f896119b162d5ba5aeaa122d0a86756560916754..274fdb928a9906e67c7a2262200cbb4c52183bd5 100644 (file)
@@ -113,8 +113,8 @@ compare_password(const char *newpass, const char *oldpass)
 
 /* Check, if the new password is already in the opasswd file.  */
 int
-check_old_password (pam_handle_t *pamh, const char *user,
-                   const char *newpass, int debug)
+check_old_pass (pam_handle_t *pamh, const char *user,
+               const char *newpass, int debug)
 {
   int retval = PAM_SUCCESS;
   FILE *oldpf;
@@ -209,8 +209,8 @@ check_old_password (pam_handle_t *pamh, const char *user,
 }
 
 int
-save_old_password (pam_handle_t *pamh, const char *user, uid_t uid,
-                  const char *oldpass, int howmany, int debug UNUSED)
+save_old_pass (pam_handle_t *pamh, const char *user, uid_t uid,
+              const char *oldpass, int howmany, int debug UNUSED)
 {
   char opasswd_tmp[] = TMP_PASSWORDS_FILE;
   struct stat opasswd_stat;
index e8a201394bf8c90b65d3ed941120e548362f7019..db3e6568ecb676bda63cc644ef591250b96c709a 100644 (file)
 #ifndef __OPASSWD_H__
 #define __OPASSWD_H__
 
-extern int check_old_password (pam_handle_t *pamh, const char *user,
-                              const char *newpass, int debug);
-extern int save_old_password (pam_handle_t *pamh, const char *user,
-                             uid_t uid, const char *oldpass,
-                             int howmany, int debug);
+extern int check_old_pass (pam_handle_t *pamh, const char *user,
+                          const char *newpass, int debug);
+extern int save_old_pass (pam_handle_t *pamh, const char *user,
+                         uid_t uid, const char *oldpass,
+                         int howmany, int debug);
 
 #endif /* __OPASSWD_H__ */
index 9b588958d0b670a9fa667c1d836f5f19c83dba11..4c582bc225d00f6992912d4ce99ed8a7f63bbd67 100644 (file)
@@ -168,15 +168,15 @@ pam_sm_chauthtok (pam_handle_t *pamh, int flags, int argc, const char **argv)
       if (spw == NULL)
        return PAM_USER_UNKNOWN;
 
-      retval = save_old_password (pamh, user, pwd->pw_uid, spw->sp_pwdp,
-                                 options.remember, options.debug);
+      retval = save_old_pass (pamh, user, pwd->pw_uid, spw->sp_pwdp,
+                             options.remember, options.debug);
       if (retval != PAM_SUCCESS)
        return retval;
     }
   else
     {
-      retval = save_old_password (pamh, user, pwd->pw_uid, pwd->pw_passwd,
-                                 options.remember, options.debug);
+      retval = save_old_pass (pamh, user, pwd->pw_uid, pwd->pw_passwd,
+                             options.remember, options.debug);
       if (retval != PAM_SUCCESS)
        return retval;
     }
@@ -208,8 +208,8 @@ pam_sm_chauthtok (pam_handle_t *pamh, int flags, int argc, const char **argv)
       if (options.debug)
        pam_syslog (pamh, LOG_DEBUG, "check against old password file");
 
-      if (check_old_password (pamh, user, newpass,
-                             options.debug) != PAM_SUCCESS)
+      if (check_old_pass (pamh, user, newpass,
+                         options.debug) != PAM_SUCCESS)
        {
          pam_error (pamh,
                     _("Password has been already used. Choose another."));
index c72d27a07dc87935f9d0203e4a3c3f1b2113f690..d3d6779a3d4ef055482df1c4ab9ecdada41f5fbd 100644 (file)
@@ -844,7 +844,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int flags UNUSED,
 
 /* static module data */
 
-struct pam_module _pam_tally_modstruct = {
+struct pam_module _pam_tally2_modstruct = {
      MODULE_NAME,
 #ifdef PAM_SM_AUTH
      pam_sm_authenticate,