From c3671512d8f4fe9c448d494c0c392b358b33ab69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Mon, 27 Jul 2009 15:48:43 +0000 Subject: [PATCH] - fix malformed patch --- pam-1.1.0-cracklib-authtok.patch | 42 +++++++++++++++++--------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/pam-1.1.0-cracklib-authtok.patch b/pam-1.1.0-cracklib-authtok.patch index 164d229..52c842d 100644 --- a/pam-1.1.0-cracklib-authtok.patch +++ b/pam-1.1.0-cracklib-authtok.patch @@ -1,7 +1,11 @@ -Reset the new authtok if weak. +Index: modules/pam_cracklib/pam_cracklib.c +=================================================================== +RCS file: /cvsroot/pam/Linux-PAM/modules/pam_cracklib/pam_cracklib.c,v +retrieving revision 1.33 +retrieving revision 1.34 diff -u -p -r1.33 -r1.34 ---- modules/pam_cracklib/pam_cracklib.c 11 Dec 2008 19:41:49 -0000 1.33 -+++ modules/pam_cracklib/pam_cracklib.c 21 Jul 2009 13:59:24 -0000 1.34 +--- Linux-PAM/modules/pam_cracklib/pam_cracklib.c 11 Dec 2008 19:41:49 -0000 1.33 ++++ Linux-PAM/modules/pam_cracklib/pam_cracklib.c 21 Jul 2009 13:59:24 -0000 1.34 @@ -545,7 +545,7 @@ static int _pam_unix_approve_pass(pam_ha const char *pass_new) { @@ -18,21 +22,21 @@ diff -u -p -r1.33 -r1.34 - retval = pam_get_item(pamh, PAM_USER, &user); + retval = pam_get_user(pamh, &user, NULL); if (retval != PAM_SUCCESS || user == NULL) { - if (ctrl & PAM_DEBUG_ARG) - pam_syslog(pamh,LOG_ERR,"Can not get username"); + if (ctrl & PAM_DEBUG_ARG) + pam_syslog(pamh,LOG_ERR,"Can not get username"); @@ -658,6 +658,7 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand - pam_error (pamh, _("BAD PASSWORD: %s"), crack_msg); - if (getuid() || (flags & PAM_CHANGE_EXPIRED_AUTHTOK)) - { -+ pam_set_item (pamh, PAM_AUTHTOK, NULL); - retval = PAM_AUTHTOK_ERR; - continue; - } + pam_error (pamh, _("BAD PASSWORD: %s"), crack_msg); + if (getuid() || (flags & PAM_CHANGE_EXPIRED_AUTHTOK)) + { ++ pam_set_item (pamh, PAM_AUTHTOK, NULL); + retval = PAM_AUTHTOK_ERR; + continue; + } @@ -670,6 +671,7 @@ PAM_EXTERN int pam_sm_chauthtok(pam_hand - if (retval != PAM_SUCCESS) { - if (getuid() || (flags & PAM_CHANGE_EXPIRED_AUTHTOK)) - { -+ pam_set_item(pamh, PAM_AUTHTOK, NULL); - retval = PAM_AUTHTOK_ERR; - continue; - } + if (retval != PAM_SUCCESS) { + if (getuid() || (flags & PAM_CHANGE_EXPIRED_AUTHTOK)) + { ++ pam_set_item(pamh, PAM_AUTHTOK, NULL); + retval = PAM_AUTHTOK_ERR; + continue; + }