Remove FascistHistory() and FascistHistoryPw() calls
These functions don't seem to exist anymore. I can't find them in Debian, nor in a web search. They probably were functions from an ancient implementation of cracklib that doesn't exist anymore. $ git remote -v origin git@github.com:cracklib/cracklib.git (fetch) origin git@github.com:cracklib/cracklib.git (push) $ grep -rni fascisthistory $ git log --grep FascistHistory $ git log -S FascistHistory Closes: <https://codesearch.debian.net/search?q=FascistHistory&literal=1> Cc: Mike Frysinger <vapier@gentoo.org> Acked-by: Michael Vetter <jubalh@iodoru.org> Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
committed by
Serge Hallyn
parent
1c50a44db6
commit
43b4e5a6c4
@@ -526,10 +526,6 @@ if test "$with_libcrack" = "yes"; then
|
||||
echo "checking cracklib flavour, don't be surprised by the results"
|
||||
AC_CHECK_LIB(crack, FascistCheck,
|
||||
[LIBCRACK=-lcrack AC_DEFINE(HAVE_LIBCRACK, 1, [Defined if you have libcrack.])])
|
||||
AC_CHECK_LIB(crack, FascistHistory,
|
||||
AC_DEFINE(HAVE_LIBCRACK_HIST, 1, [Defined if you have the ts&szs cracklib.]))
|
||||
AC_CHECK_LIB(crack, FascistHistoryPw,
|
||||
AC_DEFINE(HAVE_LIBCRACK_PW, 1, [Defined if it includes *Pw functions.]))
|
||||
fi
|
||||
|
||||
if test "$with_btrfs" != "no"; then
|
||||
|
||||
@@ -100,11 +100,7 @@ static /*@observer@*//*@null@*/const char *password_check (
|
||||
#ifdef HAVE_LIBCRACK
|
||||
char *dictpath;
|
||||
|
||||
#ifdef HAVE_LIBCRACK_PW
|
||||
char *FascistCheckPw ();
|
||||
#else
|
||||
char *FascistCheck ();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (strcmp (new, old) == 0) {
|
||||
@@ -133,11 +129,7 @@ static /*@observer@*//*@null@*/const char *password_check (
|
||||
|
||||
dictpath = getdef_str ("CRACKLIB_DICTPATH");
|
||||
if (NULL != dictpath) {
|
||||
#ifdef HAVE_LIBCRACK_PW
|
||||
msg = FascistCheckPw (new, dictpath, pwdp);
|
||||
#else
|
||||
msg = FascistCheck (new, dictpath);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
+2
-31
@@ -114,7 +114,6 @@ static bool do_update_pwd = false;
|
||||
/* local function prototypes */
|
||||
NORETURN static void usage (int);
|
||||
|
||||
static bool reuse (const char *, const struct passwd *);
|
||||
static int new_password (const struct passwd *);
|
||||
|
||||
static void check_password (const struct passwd *, const struct spwd *);
|
||||
@@ -163,27 +162,6 @@ usage (int status)
|
||||
exit (status);
|
||||
}
|
||||
|
||||
static bool reuse (const char *pass, const struct passwd *pw)
|
||||
{
|
||||
#ifdef HAVE_LIBCRACK_HIST
|
||||
const char *reason;
|
||||
|
||||
#ifdef HAVE_LIBCRACK_PW
|
||||
const char *FascistHistoryPw (const char *, const struct passwd *);
|
||||
|
||||
reason = FascistHistory (pass, pw);
|
||||
#else /* !HAVE_LIBCRACK_PW */
|
||||
const char *FascistHistory (const char *, int);
|
||||
|
||||
reason = FascistHistory (pass, pw->pw_uid);
|
||||
#endif /* !HAVE_LIBCRACK_PW */
|
||||
if (NULL != reason) {
|
||||
(void) printf (_("Bad password: %s. "), reason);
|
||||
return true;
|
||||
}
|
||||
#endif /* HAVE_LIBCRACK_HIST */
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
* new_password - validate old password and replace with new (both old and
|
||||
@@ -202,10 +180,6 @@ static int new_password (const struct passwd *pw)
|
||||
int pass_max_len = -1;
|
||||
const char *method;
|
||||
|
||||
#ifdef HAVE_LIBCRACK_HIST
|
||||
int HistUpdate (const char *, const char *);
|
||||
#endif /* HAVE_LIBCRACK_HIST */
|
||||
|
||||
/*
|
||||
* Authenticate the user. The user will be prompted for their own
|
||||
* password.
|
||||
@@ -306,7 +280,7 @@ static int new_password (const struct passwd *pw)
|
||||
STRTCPY(pass, cp);
|
||||
erase_pass (cp);
|
||||
|
||||
if (!amroot && (!obscure (orig, pass, pw) || reuse (pass, pw))) {
|
||||
if (!amroot && !obscure(orig, pass, pw)) {
|
||||
(void) puts (_("Try again."));
|
||||
continue;
|
||||
}
|
||||
@@ -317,7 +291,7 @@ static int new_password (const struct passwd *pw)
|
||||
* --marekm
|
||||
*/
|
||||
if (amroot && !warned && getdef_bool ("PASS_ALWAYS_WARN")
|
||||
&& (!obscure (orig, pass, pw) || reuse (pass, pw))) {
|
||||
&& !obscure(orig, pass, pw)) {
|
||||
(void) puts (_("\nWarning: weak password (enter it again to use it anyway)."));
|
||||
warned = true;
|
||||
continue;
|
||||
@@ -357,9 +331,6 @@ static int new_password (const struct passwd *pw)
|
||||
return -1;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBCRACK_HIST
|
||||
HistUpdate (pw->pw_name, crypt_passwd);
|
||||
#endif /* HAVE_LIBCRACK_HIST */
|
||||
STRTCPY(crypt_passwd, cp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user