Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 469774 | Differences between
and this patch

Collapse All | Expand All

(-)a/modules/pam_pwhistory/opasswd.c (-1 / +1 lines)
Lines 108-114 compare_password(const char *newpass, const char *oldpass) Link Here
108
  outval = crypt (newpass, oldpass);
108
  outval = crypt (newpass, oldpass);
109
#endif
109
#endif
110
110
111
  return strcmp(outval, oldpass) == 0;
111
  return outval != NULL && strcmp(outval, oldpass) == 0;
112
}
112
}
113
113
114
/* Check, if the new password is already in the opasswd file.  */
114
/* Check, if the new password is already in the opasswd file.  */
(-)a/modules/pam_unix/bigcrypt.c (-1 / +9 lines)
Lines 109-114 char *bigcrypt(const char *key, const char *salt) Link Here
109
#else
109
#else
110
	tmp_ptr = crypt(plaintext_ptr, salt);	/* libc crypt() */
110
	tmp_ptr = crypt(plaintext_ptr, salt);	/* libc crypt() */
111
#endif
111
#endif
112
	if (tmp_ptr == NULL) {
113
		free(dec_c2_cryptbuf);
114
		return NULL;
115
	}
112
	/* and place in the static area */
116
	/* and place in the static area */
113
	strncpy(cipher_ptr, tmp_ptr, 13);
117
	strncpy(cipher_ptr, tmp_ptr, 13);
114
	cipher_ptr += ESEGMENT_SIZE + SALT_SIZE;
118
	cipher_ptr += ESEGMENT_SIZE + SALT_SIZE;
Lines 130-135 char *bigcrypt(const char *key, const char *salt) Link Here
130
#else
134
#else
131
			tmp_ptr = crypt(plaintext_ptr, salt_ptr);
135
			tmp_ptr = crypt(plaintext_ptr, salt_ptr);
132
#endif
136
#endif
137
			if (tmp_ptr == NULL) {
138
				_pam_overwrite(dec_c2_cryptbuf);
139
				free(dec_c2_cryptbuf);
140
				return NULL;
141
			}
133
142
134
			/* skip the salt for seg!=0 */
143
			/* skip the salt for seg!=0 */
135
			strncpy(cipher_ptr, (tmp_ptr + SALT_SIZE), ESEGMENT_SIZE);
144
			strncpy(cipher_ptr, (tmp_ptr + SALT_SIZE), ESEGMENT_SIZE);
136
- 

Return to bug 469774